Update module github.com/mattn/go-sqlite3 to v1.14.29

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-07-24 14:21:35 +00:00
committed by GitHub
parent eabb64ddaf
commit 31fafad0c1
6 changed files with 3269 additions and 1787 deletions

2
go.mod
View File

@ -43,7 +43,7 @@ require (
github.com/klauspost/pgzip v1.2.6 github.com/klauspost/pgzip v1.2.6
github.com/linuxkit/virtsock v0.0.0-20241009230534-cb6a20cc0422 github.com/linuxkit/virtsock v0.0.0-20241009230534-cb6a20cc0422
github.com/mattn/go-shellwords v1.0.12 github.com/mattn/go-shellwords v1.0.12
github.com/mattn/go-sqlite3 v1.14.28 github.com/mattn/go-sqlite3 v1.14.29
github.com/mdlayher/vsock v1.2.1 github.com/mdlayher/vsock v1.2.1
github.com/moby/docker-image-spec v1.3.1 github.com/moby/docker-image-spec v1.3.1
github.com/moby/sys/capability v0.4.0 github.com/moby/sys/capability v0.4.0

4
go.sum
View File

@ -274,8 +274,8 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A= github.com/mattn/go-sqlite3 v1.14.29 h1:1O6nRLJKvsi1H2Sj0Hzdfojwt8GiGKm+LOfLaBFaouQ=
github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v1.14.29/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mdlayher/packet v1.1.2 h1:3Up1NG6LZrsgDVn6X4L9Ge/iyRyxFEFD9o6Pr3Q1nQY= github.com/mdlayher/packet v1.1.2 h1:3Up1NG6LZrsgDVn6X4L9Ge/iyRyxFEFD9o6Pr3Q1nQY=
github.com/mdlayher/packet v1.1.2/go.mod h1:GEu1+n9sG5VtiRE4SydOmX5GTwyyYlteZiFU+x0kew4= github.com/mdlayher/packet v1.1.2/go.mod h1:GEu1+n9sG5VtiRE4SydOmX5GTwyyYlteZiFU+x0kew4=
github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos= github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos=

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ extern "C" {
** **
** Since [version 3.6.18] ([dateof:3.6.18]), ** Since [version 3.6.18] ([dateof:3.6.18]),
** SQLite source code has been stored in the ** SQLite source code has been stored in the
** <a href="http://www.fossil-scm.org/">Fossil configuration management ** <a href="http://fossil-scm.org/">Fossil configuration management
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
** a string which identifies a particular check-in of SQLite ** a string which identifies a particular check-in of SQLite
** within its configuration management system. ^The SQLITE_SOURCE_ID ** within its configuration management system. ^The SQLITE_SOURCE_ID
@ -147,9 +147,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.49.1" #define SQLITE_VERSION "3.50.3"
#define SQLITE_VERSION_NUMBER 3049001 #define SQLITE_VERSION_NUMBER 3050003
#define SQLITE_SOURCE_ID "2025-02-18 13:38:58 873d4e274b4988d260ba8354a9718324a1c26187a4ab4c1cc0227c03d0f10e70" #define SQLITE_SOURCE_ID "2025-07-17 13:25:10 3ce993b8657d6d9deda380a93cdd6404a8c8ba1b185b2bc423703e41ae5f2543"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -1164,6 +1164,12 @@ struct sqlite3_io_methods {
** the value that M is to be set to. Before returning, the 32-bit signed ** the value that M is to be set to. Before returning, the 32-bit signed
** integer is overwritten with the previous value of M. ** integer is overwritten with the previous value of M.
** **
** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
** VFS to block when taking a SHARED lock to connect to a wal mode database.
** This is used to implement the functionality associated with
** SQLITE_SETLK_BLOCK_ON_CONNECT.
**
** <li>[[SQLITE_FCNTL_DATA_VERSION]] ** <li>[[SQLITE_FCNTL_DATA_VERSION]]
** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to ** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
** a database file. The argument is a pointer to a 32-bit unsigned integer. ** a database file. The argument is a pointer to a 32-bit unsigned integer.
@ -1260,6 +1266,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_CKSM_FILE 41 #define SQLITE_FCNTL_CKSM_FILE 41
#define SQLITE_FCNTL_RESET_CACHE 42 #define SQLITE_FCNTL_RESET_CACHE 42
#define SQLITE_FCNTL_NULL_IO 43 #define SQLITE_FCNTL_NULL_IO 43
#define SQLITE_FCNTL_BLOCK_ON_CONNECT 44
/* deprecated names */ /* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@ -1990,13 +1997,16 @@ struct sqlite3_mem_methods {
** **
** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt> ** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine ** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
** the default size of lookaside memory on each [database connection]. ** the default size of [lookaside memory] on each [database connection].
** The first argument is the ** The first argument is the
** size of each lookaside buffer slot and the second is the number of ** size of each lookaside buffer slot ("sz") and the second is the number of
** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE ** slots allocated to each database connection ("cnt").)^
** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] ** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.
** option to [sqlite3_db_config()] can be used to change the lookaside ** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can
** configuration on individual connections.)^ </dd> ** be used to change the lookaside configuration on individual connections.)^
** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the
** default lookaside configuration at compile-time.
** </dd>
** **
** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt> ** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is ** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is
@ -2233,31 +2243,50 @@ struct sqlite3_mem_methods {
** [[SQLITE_DBCONFIG_LOOKASIDE]] ** [[SQLITE_DBCONFIG_LOOKASIDE]]
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt> ** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the ** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
** configuration of the lookaside memory allocator within a database ** configuration of the [lookaside memory allocator] within a database
** connection. ** connection.
** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i> ** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
** in the [DBCONFIG arguments|usual format]. ** in the [DBCONFIG arguments|usual format].
** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two, ** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE ** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
** should have a total of five parameters. ** should have a total of five parameters.
** ^The first argument (the third parameter to [sqlite3_db_config()] is a ** <ol>
** <li><p>The first argument ("buf") is a
** pointer to a memory buffer to use for lookaside memory. ** pointer to a memory buffer to use for lookaside memory.
** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb ** The first argument may be NULL in which case SQLite will allocate the
** may be NULL in which case SQLite will allocate the ** lookaside buffer itself using [sqlite3_malloc()].
** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the ** <li><P>The second argument ("sz") is the
** size of each lookaside buffer slot. ^The third argument is the number of ** size of each lookaside buffer slot. Lookaside is disabled if "sz"
** slots. The size of the buffer in the first argument must be greater than ** is less than 8. The "sz" argument should be a multiple of 8 less than
** or equal to the product of the second and third arguments. The buffer ** 65536. If "sz" does not meet this constraint, it is reduced in size until
** must be aligned to an 8-byte boundary. ^If the second argument to ** it does.
** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally ** <li><p>The third argument ("cnt") is the number of slots. Lookaside is disabled
** rounded down to the next smaller multiple of 8. ^(The lookaside memory ** if "cnt"is less than 1. The "cnt" value will be reduced, if necessary, so
** that the product of "sz" and "cnt" does not exceed 2,147,418,112. The "cnt"
** parameter is usually chosen so that the product of "sz" and "cnt" is less
** than 1,000,000.
** </ol>
** <p>If the "buf" argument is not NULL, then it must
** point to a memory buffer with a size that is greater than
** or equal to the product of "sz" and "cnt".
** The buffer must be aligned to an 8-byte boundary.
** The lookaside memory
** configuration for a database connection can only be changed when that ** configuration for a database connection can only be changed when that
** connection is not currently using lookaside memory, or in other words ** connection is not currently using lookaside memory, or in other words
** when the "current value" returned by ** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.
** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
** Any attempt to change the lookaside memory configuration when lookaside ** Any attempt to change the lookaside memory configuration when lookaside
** memory is in use leaves the configuration unchanged and returns ** memory is in use leaves the configuration unchanged and returns
** [SQLITE_BUSY].)^</dd> ** [SQLITE_BUSY].
** If the "buf" argument is NULL and an attempt
** to allocate memory based on "sz" and "cnt" fails, then
** lookaside is silently disabled.
** <p>
** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the
** default lookaside configuration at initialization. The
** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside
** configuration at compile-time. Typical values for lookaside are 1200 for
** "sz" and 40 to 100 for "cnt".
** </dd>
** **
** [[SQLITE_DBCONFIG_ENABLE_FKEY]] ** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt> ** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
@ -2994,6 +3023,44 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
*/ */
SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
/*
** CAPI3REF: Set the Setlk Timeout
** METHOD: sqlite3
**
** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If
** the VFS supports blocking locks, it sets the timeout in ms used by
** eligible locks taken on wal mode databases by the specified database
** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does
** not support blocking locks, this function is a no-op.
**
** Passing 0 to this function disables blocking locks altogether. Passing
** -1 to this function requests that the VFS blocks for a long time -
** indefinitely if possible. The results of passing any other negative value
** are undefined.
**
** Internally, each SQLite database handle store two timeout values - the
** busy-timeout (used for rollback mode databases, or if the VFS does not
** support blocking locks) and the setlk-timeout (used for blocking locks
** on wal-mode databases). The sqlite3_busy_timeout() method sets both
** values, this function sets only the setlk-timeout value. Therefore,
** to configure separate busy-timeout and setlk-timeout values for a single
** database handle, call sqlite3_busy_timeout() followed by this function.
**
** Whenever the number of connections to a wal mode database falls from
** 1 to 0, the last connection takes an exclusive lock on the database,
** then checkpoints and deletes the wal file. While it is doing this, any
** new connection that tries to read from the database fails with an
** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is
** passed to this API, the new connection blocks until the exclusive lock
** has been released.
*/
SQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
/*
** CAPI3REF: Flags for sqlite3_setlk_timeout()
*/
#define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01
/* /*
** CAPI3REF: Convenience Routines For Running Queries ** CAPI3REF: Convenience Routines For Running Queries
** METHOD: sqlite3 ** METHOD: sqlite3
@ -4013,7 +4080,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
** **
** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
** database filename D with corresponding journal file J and WAL file W and ** database filename D with corresponding journal file J and WAL file W and
** with N URI parameters key/values pairs in the array P. The result from ** an array P of N URI Key/Value pairs. The result from
** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that ** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
** is safe to pass to routines like: ** is safe to pass to routines like:
** <ul> ** <ul>
@ -4694,7 +4761,7 @@ typedef struct sqlite3_context sqlite3_context;
** METHOD: sqlite3_stmt ** METHOD: sqlite3_stmt
** **
** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, ** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
** literals may be replaced by a [parameter] that matches one of following ** literals may be replaced by a [parameter] that matches one of the following
** templates: ** templates:
** **
** <ul> ** <ul>
@ -4739,7 +4806,7 @@ typedef struct sqlite3_context sqlite3_context;
** **
** [[byte-order determination rules]] ^The byte-order of ** [[byte-order determination rules]] ^The byte-order of
** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF) ** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)
** found in first character, which is removed, or in the absence of a BOM ** found in the first character, which is removed, or in the absence of a BOM
** the byte order is the native byte order of the host ** the byte order is the native byte order of the host
** machine for sqlite3_bind_text16() or the byte order specified in ** machine for sqlite3_bind_text16() or the byte order specified in
** the 6th parameter for sqlite3_bind_text64().)^ ** the 6th parameter for sqlite3_bind_text64().)^
@ -4759,7 +4826,7 @@ typedef struct sqlite3_context sqlite3_context;
** or sqlite3_bind_text16() or sqlite3_bind_text64() then ** or sqlite3_bind_text16() or sqlite3_bind_text64() then
** that parameter must be the byte offset ** that parameter must be the byte offset
** where the NUL terminator would occur assuming the string were NUL ** where the NUL terminator would occur assuming the string were NUL
** terminated. If any NUL characters occurs at byte offsets less than ** terminated. If any NUL characters occur at byte offsets less than
** the value of the fourth parameter then the resulting string value will ** the value of the fourth parameter then the resulting string value will
** contain embedded NULs. The result of expressions involving strings ** contain embedded NULs. The result of expressions involving strings
** with embedded NULs is undefined. ** with embedded NULs is undefined.
@ -4971,7 +5038,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
** METHOD: sqlite3_stmt ** METHOD: sqlite3_stmt
** **
** ^These routines provide a means to determine the database, table, and ** ^These routines provide a means to determine the database, table, and
** table column that is the origin of a particular result column in ** table column that is the origin of a particular result column in a
** [SELECT] statement. ** [SELECT] statement.
** ^The name of the database or table or column can be returned as ** ^The name of the database or table or column can be returned as
** either a UTF-8 or UTF-16 string. ^The _database_ routines return ** either a UTF-8 or UTF-16 string. ^The _database_ routines return
@ -5109,7 +5176,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
** other than [SQLITE_ROW] before any subsequent invocation of ** other than [SQLITE_ROW] before any subsequent invocation of
** sqlite3_step(). Failure to reset the prepared statement using ** sqlite3_step(). Failure to reset the prepared statement using
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from ** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1], ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
** sqlite3_step() began ** sqlite3_step() began
** calling [sqlite3_reset()] automatically in this circumstance rather ** calling [sqlite3_reset()] automatically in this circumstance rather
** than returning [SQLITE_MISUSE]. This is not considered a compatibility ** than returning [SQLITE_MISUSE]. This is not considered a compatibility
@ -5540,8 +5607,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
** **
** For best security, the [SQLITE_DIRECTONLY] flag is recommended for ** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
** all application-defined SQL functions that do not need to be ** all application-defined SQL functions that do not need to be
** used inside of triggers, view, CHECK constraints, or other elements of ** used inside of triggers, views, CHECK constraints, or other elements of
** the database schema. This flags is especially recommended for SQL ** the database schema. This flag is especially recommended for SQL
** functions that have side effects or reveal internal application state. ** functions that have side effects or reveal internal application state.
** Without this flag, an attacker might be able to modify the schema of ** Without this flag, an attacker might be able to modify the schema of
** a database file to include invocations of the function with parameters ** a database file to include invocations of the function with parameters
@ -5572,7 +5639,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
** [user-defined window functions|available here]. ** [user-defined window functions|available here].
** **
** ^(If the final parameter to sqlite3_create_function_v2() or ** ^(If the final parameter to sqlite3_create_function_v2() or
** sqlite3_create_window_function() is not NULL, then it is destructor for ** sqlite3_create_window_function() is not NULL, then it is the destructor for
** the application data pointer. The destructor is invoked when the function ** the application data pointer. The destructor is invoked when the function
** is deleted, either by being overloaded or when the database connection ** is deleted, either by being overloaded or when the database connection
** closes.)^ ^The destructor is also invoked if the call to ** closes.)^ ^The destructor is also invoked if the call to
@ -5972,7 +6039,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
** METHOD: sqlite3_value ** METHOD: sqlite3_value
** **
** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
** object D and returns a pointer to that copy. ^The [sqlite3_value] returned ** object V and returns a pointer to that copy. ^The [sqlite3_value] returned
** is a [protected sqlite3_value] object even if the input is not. ** is a [protected sqlite3_value] object even if the input is not.
** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a ** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
** memory allocation fails. ^If V is a [pointer value], then the result ** memory allocation fails. ^If V is a [pointer value], then the result
@ -6010,7 +6077,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*);
** allocation error occurs. ** allocation error occurs.
** **
** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
** determined by the N parameter on first successful call. Changing the ** determined by the N parameter on the first successful call. Changing the
** value of N in any subsequent call to sqlite3_aggregate_context() within ** value of N in any subsequent call to sqlite3_aggregate_context() within
** the same aggregate function instance will not resize the memory ** the same aggregate function instance will not resize the memory
** allocation.)^ Within the xFinal callback, it is customary to set ** allocation.)^ Within the xFinal callback, it is customary to set
@ -6172,7 +6239,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
** **
** Security Warning: These interfaces should not be exposed in scripting ** Security Warning: These interfaces should not be exposed in scripting
** languages or in other circumstances where it might be possible for an ** languages or in other circumstances where it might be possible for an
** an attacker to invoke them. Any agent that can invoke these interfaces ** attacker to invoke them. Any agent that can invoke these interfaces
** can probably also take control of the process. ** can probably also take control of the process.
** **
** Database connection client data is only available for SQLite ** Database connection client data is only available for SQLite
@ -6286,7 +6353,7 @@ typedef void (*sqlite3_destructor_type)(void*);
** pointed to by the 2nd parameter are taken as the application-defined ** pointed to by the 2nd parameter are taken as the application-defined
** function result. If the 3rd parameter is non-negative, then it ** function result. If the 3rd parameter is non-negative, then it
** must be the byte offset into the string where the NUL terminator would ** must be the byte offset into the string where the NUL terminator would
** appear if the string where NUL terminated. If any NUL characters occur ** appear if the string were NUL terminated. If any NUL characters occur
** in the string at a byte offset that is less than the value of the 3rd ** in the string at a byte offset that is less than the value of the 3rd
** parameter, then the resulting string will contain embedded NULs and the ** parameter, then the resulting string will contain embedded NULs and the
** result of expressions operating on strings with embedded NULs is undefined. ** result of expressions operating on strings with embedded NULs is undefined.
@ -6344,7 +6411,7 @@ typedef void (*sqlite3_destructor_type)(void*);
** string and preferably a string literal. The sqlite3_result_pointer() ** string and preferably a string literal. The sqlite3_result_pointer()
** routine is part of the [pointer passing interface] added for SQLite 3.20.0. ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
** **
** If these routines are called from within the different thread ** If these routines are called from within a different thread
** than the one containing the application-defined function that received ** than the one containing the application-defined function that received
** the [sqlite3_context] pointer, the results are undefined. ** the [sqlite3_context] pointer, the results are undefined.
*/ */
@ -6750,7 +6817,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
** METHOD: sqlite3 ** METHOD: sqlite3
** **
** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name ** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
** for the N-th database on database connection D, or a NULL pointer of N is ** for the N-th database on database connection D, or a NULL pointer if N is
** out of range. An N value of 0 means the main database file. An N of 1 is ** out of range. An N value of 0 means the main database file. An N of 1 is
** the "temp" schema. Larger values of N correspond to various ATTACH-ed ** the "temp" schema. Larger values of N correspond to various ATTACH-ed
** databases. ** databases.
@ -6845,7 +6912,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
** <dd>The SQLITE_TXN_READ state means that the database is currently ** <dd>The SQLITE_TXN_READ state means that the database is currently
** in a read transaction. Content has been read from the database file ** in a read transaction. Content has been read from the database file
** but nothing in the database file has changed. The transaction state ** but nothing in the database file has changed. The transaction state
** will advanced to SQLITE_TXN_WRITE if any changes occur and there are ** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are
** no other conflicting concurrent write transactions. The transaction ** no other conflicting concurrent write transactions. The transaction
** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or
** [COMMIT].</dd> ** [COMMIT].</dd>
@ -6854,7 +6921,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
** <dd>The SQLITE_TXN_WRITE state means that the database is currently ** <dd>The SQLITE_TXN_WRITE state means that the database is currently
** in a write transaction. Content has been written to the database file ** in a write transaction. Content has been written to the database file
** but has not yet committed. The transaction state will change to ** but has not yet committed. The transaction state will change to
** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd> ** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
*/ */
#define SQLITE_TXN_NONE 0 #define SQLITE_TXN_NONE 0
#define SQLITE_TXN_READ 1 #define SQLITE_TXN_READ 1
@ -7005,6 +7072,8 @@ SQLITE_API int sqlite3_autovacuum_pages(
** **
** ^The second argument is a pointer to the function to invoke when a ** ^The second argument is a pointer to the function to invoke when a
** row is updated, inserted or deleted in a rowid table. ** row is updated, inserted or deleted in a rowid table.
** ^The update hook is disabled by invoking sqlite3_update_hook()
** with a NULL pointer as the second parameter.
** ^The first argument to the callback is a copy of the third argument ** ^The first argument to the callback is a copy of the third argument
** to sqlite3_update_hook(). ** to sqlite3_update_hook().
** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], ** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
@ -7133,7 +7202,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
** CAPI3REF: Impose A Limit On Heap Size ** CAPI3REF: Impose A Limit On Heap Size
** **
** These interfaces impose limits on the amount of heap memory that will be ** These interfaces impose limits on the amount of heap memory that will be
** by all database connections within a single process. ** used by all database connections within a single process.
** **
** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
** soft limit on the amount of heap memory that may be allocated by SQLite. ** soft limit on the amount of heap memory that may be allocated by SQLite.
@ -7191,7 +7260,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
** </ul>)^ ** </ul>)^
** **
** The circumstances under which SQLite will enforce the heap limits may ** The circumstances under which SQLite will enforce the heap limits may
** changes in future releases of SQLite. ** change in future releases of SQLite.
*/ */
SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N); SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
@ -7306,8 +7375,8 @@ SQLITE_API int sqlite3_table_column_metadata(
** ^The entry point is zProc. ** ^The entry point is zProc.
** ^(zProc may be 0, in which case SQLite will try to come up with an ** ^(zProc may be 0, in which case SQLite will try to come up with an
** entry point name on its own. It first tries "sqlite3_extension_init". ** entry point name on its own. It first tries "sqlite3_extension_init".
** If that does not work, it constructs a name "sqlite3_X_init" where the ** If that does not work, it constructs a name "sqlite3_X_init" where
** X is consists of the lower-case equivalent of all ASCII alphabetic ** X consists of the lower-case equivalent of all ASCII alphabetic
** characters in the filename from the last "/" to the first following ** characters in the filename from the last "/" to the first following
** "." and omitting any initial "lib".)^ ** "." and omitting any initial "lib".)^
** ^The sqlite3_load_extension() interface returns ** ^The sqlite3_load_extension() interface returns
@ -7378,7 +7447,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
** ^(Even though the function prototype shows that xEntryPoint() takes ** ^(Even though the function prototype shows that xEntryPoint() takes
** no arguments and returns void, SQLite invokes xEntryPoint() with three ** no arguments and returns void, SQLite invokes xEntryPoint() with three
** arguments and expects an integer result as if the signature of the ** arguments and expects an integer result as if the signature of the
** entry point where as follows: ** entry point were as follows:
** **
** <blockquote><pre> ** <blockquote><pre>
** &nbsp; int xEntryPoint( ** &nbsp; int xEntryPoint(
@ -7542,7 +7611,7 @@ struct sqlite3_module {
** virtual table and might not be checked again by the byte code.)^ ^(The ** virtual table and might not be checked again by the byte code.)^ ^(The
** aConstraintUsage[].omit flag is an optimization hint. When the omit flag ** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
** is left in its default setting of false, the constraint will always be ** is left in its default setting of false, the constraint will always be
** checked separately in byte code. If the omit flag is change to true, then ** checked separately in byte code. If the omit flag is changed to true, then
** the constraint may or may not be checked in byte code. In other words, ** the constraint may or may not be checked in byte code. In other words,
** when the omit flag is true there is no guarantee that the constraint will ** when the omit flag is true there is no guarantee that the constraint will
** not be checked again using byte code.)^ ** not be checked again using byte code.)^
@ -7568,7 +7637,7 @@ struct sqlite3_module {
** The xBestIndex method may optionally populate the idxFlags field with a ** The xBestIndex method may optionally populate the idxFlags field with a
** mask of SQLITE_INDEX_SCAN_* flags. One such flag is ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN] ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
** output to show the idxNum has hex instead of as decimal. Another flag is ** output to show the idxNum as hex instead of as decimal. Another flag is
** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
** return at most one row. ** return at most one row.
** **
@ -7709,7 +7778,7 @@ struct sqlite3_index_info {
** the implementation of the [virtual table module]. ^The fourth ** the implementation of the [virtual table module]. ^The fourth
** parameter is an arbitrary client data pointer that is passed through ** parameter is an arbitrary client data pointer that is passed through
** into the [xCreate] and [xConnect] methods of the virtual table module ** into the [xCreate] and [xConnect] methods of the virtual table module
** when a new virtual table is be being created or reinitialized. ** when a new virtual table is being created or reinitialized.
** **
** ^The sqlite3_create_module_v2() interface has a fifth parameter which ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
** is a pointer to a destructor for the pClientData. ^SQLite will ** is a pointer to a destructor for the pClientData. ^SQLite will
@ -7874,7 +7943,7 @@ typedef struct sqlite3_blob sqlite3_blob;
** in *ppBlob. Otherwise an [error code] is returned and, unless the error ** in *ppBlob. Otherwise an [error code] is returned and, unless the error
** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided ** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
** the API is not misused, it is always safe to call [sqlite3_blob_close()] ** the API is not misused, it is always safe to call [sqlite3_blob_close()]
** on *ppBlob after this function it returns. ** on *ppBlob after this function returns.
** **
** This function fails with SQLITE_ERROR if any of the following are true: ** This function fails with SQLITE_ERROR if any of the following are true:
** <ul> ** <ul>
@ -7994,7 +8063,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
** **
** ^Returns the size in bytes of the BLOB accessible via the ** ^Returns the size in bytes of the BLOB accessible via the
** successfully opened [BLOB handle] in its only argument. ^The ** successfully opened [BLOB handle] in its only argument. ^The
** incremental blob I/O routines can only read or overwriting existing ** incremental blob I/O routines can only read or overwrite existing
** blob content; they cannot change the size of a blob. ** blob content; they cannot change the size of a blob.
** **
** This routine only works on a [BLOB handle] which has been created ** This routine only works on a [BLOB handle] which has been created
@ -8144,7 +8213,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
** ^The sqlite3_mutex_alloc() routine allocates a new ** ^The sqlite3_mutex_alloc() routine allocates a new
** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc() ** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
** routine returns NULL if it is unable to allocate the requested ** routine returns NULL if it is unable to allocate the requested
** mutex. The argument to sqlite3_mutex_alloc() must one of these ** mutex. The argument to sqlite3_mutex_alloc() must be one of these
** integer constants: ** integer constants:
** **
** <ul> ** <ul>
@ -8377,7 +8446,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
** CAPI3REF: Retrieve the mutex for a database connection ** CAPI3REF: Retrieve the mutex for a database connection
** METHOD: sqlite3 ** METHOD: sqlite3
** **
** ^This interface returns a pointer the [sqlite3_mutex] object that ** ^This interface returns a pointer to the [sqlite3_mutex] object that
** serializes access to the [database connection] given in the argument ** serializes access to the [database connection] given in the argument
** when the [threading mode] is Serialized. ** when the [threading mode] is Serialized.
** ^If the [threading mode] is Single-thread or Multi-thread then this ** ^If the [threading mode] is Single-thread or Multi-thread then this
@ -8500,7 +8569,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
** CAPI3REF: SQL Keyword Checking ** CAPI3REF: SQL Keyword Checking
** **
** These routines provide access to the set of SQL language keywords ** These routines provide access to the set of SQL language keywords
** recognized by SQLite. Applications can uses these routines to determine ** recognized by SQLite. Applications can use these routines to determine
** whether or not a specific identifier needs to be escaped (for example, ** whether or not a specific identifier needs to be escaped (for example,
** by enclosing in double-quotes) so as not to confuse the parser. ** by enclosing in double-quotes) so as not to confuse the parser.
** **
@ -8668,7 +8737,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
** content of the dynamic string under construction in X. The value ** content of the dynamic string under construction in X. The value
** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X ** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
** and might be freed or altered by any subsequent method on the same ** and might be freed or altered by any subsequent method on the same
** [sqlite3_str] object. Applications must not used the pointer returned ** [sqlite3_str] object. Applications must not use the pointer returned by
** [sqlite3_str_value(X)] after any subsequent method call on the same ** [sqlite3_str_value(X)] after any subsequent method call on the same
** object. ^Applications may change the content of the string returned ** object. ^Applications may change the content of the string returned
** by [sqlite3_str_value(X)] as long as they do not write into any bytes ** by [sqlite3_str_value(X)] as long as they do not write into any bytes
@ -8754,7 +8823,7 @@ SQLITE_API int sqlite3_status64(
** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE] ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
** buffer and where forced to overflow to [sqlite3_malloc()]. The ** buffer and where forced to overflow to [sqlite3_malloc()]. The
** returned value includes allocations that overflowed because they ** returned value includes allocations that overflowed because they
** where too large (they were larger than the "sz" parameter to ** were too large (they were larger than the "sz" parameter to
** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
** no space was left in the page cache.</dd>)^ ** no space was left in the page cache.</dd>)^
** **
@ -8838,28 +8907,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt> ** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
** <dd>This parameter returns the number of malloc attempts that were ** <dd>This parameter returns the number of malloc attempts that were
** satisfied using lookaside memory. Only the high-water value is meaningful; ** satisfied using lookaside memory. Only the high-water value is meaningful;
** the current value is always zero.)^ ** the current value is always zero.</dd>)^
** **
** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]] ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]
** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt> ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
** <dd>This parameter returns the number malloc attempts that might have ** <dd>This parameter returns the number of malloc attempts that might have
** been satisfied using lookaside memory but failed due to the amount of ** been satisfied using lookaside memory but failed due to the amount of
** memory requested being larger than the lookaside slot size. ** memory requested being larger than the lookaside slot size.
** Only the high-water value is meaningful; ** Only the high-water value is meaningful;
** the current value is always zero.)^ ** the current value is always zero.</dd>)^
** **
** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]] ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]
** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt> ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
** <dd>This parameter returns the number malloc attempts that might have ** <dd>This parameter returns the number of malloc attempts that might have
** been satisfied using lookaside memory but failed due to all lookaside ** been satisfied using lookaside memory but failed due to all lookaside
** memory already being in use. ** memory already being in use.
** Only the high-water value is meaningful; ** Only the high-water value is meaningful;
** the current value is always zero.)^ ** the current value is always zero.</dd>)^
** **
** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt> ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
** <dd>This parameter returns the approximate number of bytes of heap ** <dd>This parameter returns the approximate number of bytes of heap
** memory used by all pager caches associated with the database connection.)^ ** memory used by all pager caches associated with the database connection.)^
** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
** </dd>
** **
** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt> ** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>
@ -8868,10 +8938,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
** memory used by that pager cache is divided evenly between the attached ** memory used by that pager cache is divided evenly between the attached
** connections.)^ In other words, if none of the pager caches associated ** connections.)^ In other words, if none of the pager caches associated
** with the database connection are shared, this request returns the same ** with the database connection are shared, this request returns the same
** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are ** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are
** shared, the value returned by this call will be smaller than that returned ** shared, the value returned by this call will be smaller than that returned
** by DBSTATUS_CACHE_USED. ^The highwater mark associated with ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>
** **
** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt> ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
** <dd>This parameter returns the approximate number of bytes of heap ** <dd>This parameter returns the approximate number of bytes of heap
@ -8881,6 +8951,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
** schema memory is shared with other database connections due to ** schema memory is shared with other database connections due to
** [shared cache mode] being enabled. ** [shared cache mode] being enabled.
** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
** </dd>
** **
** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt> ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
** <dd>This parameter returns the approximate number of bytes of heap ** <dd>This parameter returns the approximate number of bytes of heap
@ -8917,7 +8988,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
** been written to disk in the middle of a transaction due to the page ** been written to disk in the middle of a transaction due to the page
** cache overflowing. Transactions are more efficient if they are written ** cache overflowing. Transactions are more efficient if they are written
** to disk all at once. When pages spill mid-transaction, that introduces ** to disk all at once. When pages spill mid-transaction, that introduces
** additional overhead. This parameter can be used help identify ** additional overhead. This parameter can be used to help identify
** inefficiencies that can be resolved by increasing the cache size. ** inefficiencies that can be resolved by increasing the cache size.
** </dd> ** </dd>
** **
@ -8988,13 +9059,13 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt> ** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>
** <dd>^This is the number of sort operations that have occurred. ** <dd>^This is the number of sort operations that have occurred.
** A non-zero value in this counter may indicate an opportunity to ** A non-zero value in this counter may indicate an opportunity to
** improvement performance through careful use of indices.</dd> ** improve performance through careful use of indices.</dd>
** **
** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt> ** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
** <dd>^This is the number of rows inserted into transient indices that ** <dd>^This is the number of rows inserted into transient indices that
** were created automatically in order to help joins run faster. ** were created automatically in order to help joins run faster.
** A non-zero value in this counter may indicate an opportunity to ** A non-zero value in this counter may indicate an opportunity to
** improvement performance by adding permanent indices that do not ** improve performance by adding permanent indices that do not
** need to be reinitialized each time the statement is run.</dd> ** need to be reinitialized each time the statement is run.</dd>
** **
** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt> ** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>
@ -9003,19 +9074,19 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
** to 2147483647. The number of virtual machine operations can be ** to 2147483647. The number of virtual machine operations can be
** used as a proxy for the total work done by the prepared statement. ** used as a proxy for the total work done by the prepared statement.
** If the number of virtual machine operations exceeds 2147483647 ** If the number of virtual machine operations exceeds 2147483647
** then the value returned by this statement status code is undefined. ** then the value returned by this statement status code is undefined.</dd>
** **
** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt> ** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>
** <dd>^This is the number of times that the prepare statement has been ** <dd>^This is the number of times that the prepare statement has been
** automatically regenerated due to schema changes or changes to ** automatically regenerated due to schema changes or changes to
** [bound parameters] that might affect the query plan. ** [bound parameters] that might affect the query plan.</dd>
** **
** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt> ** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>
** <dd>^This is the number of times that the prepared statement has ** <dd>^This is the number of times that the prepared statement has
** been run. A single "run" for the purposes of this counter is one ** been run. A single "run" for the purposes of this counter is one
** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()]. ** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
** The counter is incremented on the first [sqlite3_step()] call of each ** The counter is incremented on the first [sqlite3_step()] call of each
** cycle. ** cycle.</dd>
** **
** [[SQLITE_STMTSTATUS_FILTER_MISS]] ** [[SQLITE_STMTSTATUS_FILTER_MISS]]
** [[SQLITE_STMTSTATUS_FILTER HIT]] ** [[SQLITE_STMTSTATUS_FILTER HIT]]
@ -9025,7 +9096,7 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
** step was bypassed because a Bloom filter returned not-found. The ** step was bypassed because a Bloom filter returned not-found. The
** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of ** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
** times that the Bloom filter returned a find, and thus the join step ** times that the Bloom filter returned a find, and thus the join step
** had to be processed as normal. ** had to be processed as normal.</dd>
** **
** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt> ** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>
** <dd>^This is the approximate number of bytes of heap memory ** <dd>^This is the approximate number of bytes of heap memory
@ -9130,9 +9201,9 @@ struct sqlite3_pcache_page {
** SQLite will typically create one cache instance for each open database file, ** SQLite will typically create one cache instance for each open database file,
** though this is not guaranteed. ^The ** though this is not guaranteed. ^The
** first parameter, szPage, is the size in bytes of the pages that must ** first parameter, szPage, is the size in bytes of the pages that must
** be allocated by the cache. ^szPage will always a power of two. ^The ** be allocated by the cache. ^szPage will always be a power of two. ^The
** second parameter szExtra is a number of bytes of extra storage ** second parameter szExtra is a number of bytes of extra storage
** associated with each page cache entry. ^The szExtra parameter will ** associated with each page cache entry. ^The szExtra parameter will be
** a number less than 250. SQLite will use the ** a number less than 250. SQLite will use the
** extra szExtra bytes on each page to store metadata about the underlying ** extra szExtra bytes on each page to store metadata about the underlying
** database page on disk. The value passed into szExtra depends ** database page on disk. The value passed into szExtra depends
@ -9140,17 +9211,17 @@ struct sqlite3_pcache_page {
** ^The third argument to xCreate(), bPurgeable, is true if the cache being ** ^The third argument to xCreate(), bPurgeable, is true if the cache being
** created will be used to cache database pages of a file stored on disk, or ** created will be used to cache database pages of a file stored on disk, or
** false if it is used for an in-memory database. The cache implementation ** false if it is used for an in-memory database. The cache implementation
** does not have to do anything special based with the value of bPurgeable; ** does not have to do anything special based upon the value of bPurgeable;
** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will ** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
** never invoke xUnpin() except to deliberately delete a page. ** never invoke xUnpin() except to deliberately delete a page.
** ^In other words, calls to xUnpin() on a cache with bPurgeable set to ** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
** false will always have the "discard" flag set to true. ** false will always have the "discard" flag set to true.
** ^Hence, a cache created with bPurgeable false will ** ^Hence, a cache created with bPurgeable set to false will
** never contain any unpinned pages. ** never contain any unpinned pages.
** **
** [[the xCachesize() page cache method]] ** [[the xCachesize() page cache method]]
** ^(The xCachesize() method may be called at any time by SQLite to set the ** ^(The xCachesize() method may be called at any time by SQLite to set the
** suggested maximum cache-size (number of pages stored by) the cache ** suggested maximum cache-size (number of pages stored) for the cache
** instance passed as the first argument. This is the value configured using ** instance passed as the first argument. This is the value configured using
** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable ** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable
** parameter, the implementation is not required to do anything with this ** parameter, the implementation is not required to do anything with this
@ -9177,12 +9248,12 @@ struct sqlite3_pcache_page {
** implementation must return a pointer to the page buffer with its content ** implementation must return a pointer to the page buffer with its content
** intact. If the requested page is not already in the cache, then the ** intact. If the requested page is not already in the cache, then the
** cache implementation should use the value of the createFlag ** cache implementation should use the value of the createFlag
** parameter to help it determined what action to take: ** parameter to help it determine what action to take:
** **
** <table border=1 width=85% align=center> ** <table border=1 width=85% align=center>
** <tr><th> createFlag <th> Behavior when page is not already in cache ** <tr><th> createFlag <th> Behavior when page is not already in cache
** <tr><td> 0 <td> Do not allocate a new page. Return NULL. ** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so. ** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.
** Otherwise return NULL. ** Otherwise return NULL.
** <tr><td> 2 <td> Make every effort to allocate a new page. Only return ** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
** NULL if allocating a new page is effectively impossible. ** NULL if allocating a new page is effectively impossible.
@ -9199,7 +9270,7 @@ struct sqlite3_pcache_page {
** as its second argument. If the third parameter, discard, is non-zero, ** as its second argument. If the third parameter, discard, is non-zero,
** then the page must be evicted from the cache. ** then the page must be evicted from the cache.
** ^If the discard parameter is ** ^If the discard parameter is
** zero, then the page may be discarded or retained at the discretion of ** zero, then the page may be discarded or retained at the discretion of the
** page cache implementation. ^The page cache implementation ** page cache implementation. ^The page cache implementation
** may choose to evict unpinned pages at any time. ** may choose to evict unpinned pages at any time.
** **
@ -9217,7 +9288,7 @@ struct sqlite3_pcache_page {
** When SQLite calls the xTruncate() method, the cache must discard all ** When SQLite calls the xTruncate() method, the cache must discard all
** existing cache entries with page numbers (keys) greater than or equal ** existing cache entries with page numbers (keys) greater than or equal
** to the value of the iLimit parameter passed to xTruncate(). If any ** to the value of the iLimit parameter passed to xTruncate(). If any
** of these pages are pinned, they are implicitly unpinned, meaning that ** of these pages are pinned, they become implicitly unpinned, meaning that
** they can be safely discarded. ** they can be safely discarded.
** **
** [[the xDestroy() page cache method]] ** [[the xDestroy() page cache method]]
@ -9397,7 +9468,7 @@ typedef struct sqlite3_backup sqlite3_backup;
** external process or via a database connection other than the one being ** external process or via a database connection other than the one being
** used by the backup operation, then the backup will be automatically ** used by the backup operation, then the backup will be automatically
** restarted by the next call to sqlite3_backup_step(). ^If the source ** restarted by the next call to sqlite3_backup_step(). ^If the source
** database is modified by the using the same database connection as is used ** database is modified by using the same database connection as is used
** by the backup operation, then the backup database is automatically ** by the backup operation, then the backup database is automatically
** updated at the same time. ** updated at the same time.
** **
@ -9414,7 +9485,7 @@ typedef struct sqlite3_backup sqlite3_backup;
** and may not be used following a call to sqlite3_backup_finish(). ** and may not be used following a call to sqlite3_backup_finish().
** **
** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no ** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
** sqlite3_backup_step() errors occurred, regardless or whether or not ** sqlite3_backup_step() errors occurred, regardless of whether or not
** sqlite3_backup_step() completed. ** sqlite3_backup_step() completed.
** ^If an out-of-memory condition or IO error occurred during any prior ** ^If an out-of-memory condition or IO error occurred during any prior
** sqlite3_backup_step() call on the same [sqlite3_backup] object, then ** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
@ -9516,7 +9587,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
** application receives an SQLITE_LOCKED error, it may call the ** application receives an SQLITE_LOCKED error, it may call the
** sqlite3_unlock_notify() method with the blocked connection handle as ** sqlite3_unlock_notify() method with the blocked connection handle as
** the first argument to register for a callback that will be invoked ** the first argument to register for a callback that will be invoked
** when the blocking connections current transaction is concluded. ^The ** when the blocking connection's current transaction is concluded. ^The
** callback is invoked from within the [sqlite3_step] or [sqlite3_close] ** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
** call that concludes the blocking connection's transaction. ** call that concludes the blocking connection's transaction.
** **
@ -9536,7 +9607,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
** blocked connection already has a registered unlock-notify callback, ** blocked connection already has a registered unlock-notify callback,
** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
** called with a NULL pointer as its second argument, then any existing ** called with a NULL pointer as its second argument, then any existing
** unlock-notify callback is canceled. ^The blocked connections ** unlock-notify callback is canceled. ^The blocked connection's
** unlock-notify callback may also be canceled by closing the blocked ** unlock-notify callback may also be canceled by closing the blocked
** connection using [sqlite3_close()]. ** connection using [sqlite3_close()].
** **
@ -9934,7 +10005,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
** support constraints. In this configuration (which is the default) if ** support constraints. In this configuration (which is the default) if
** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire ** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire
** statement is rolled back as if [ON CONFLICT | OR ABORT] had been ** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
** specified as part of the users SQL statement, regardless of the actual ** specified as part of the user's SQL statement, regardless of the actual
** ON CONFLICT mode specified. ** ON CONFLICT mode specified.
** **
** If X is non-zero, then the virtual table implementation guarantees ** If X is non-zero, then the virtual table implementation guarantees
@ -9968,7 +10039,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt> ** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
** <dd>Calls of the form ** <dd>Calls of the form
** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
** the [xConnect] or [xCreate] methods of a [virtual table] implementation ** [xConnect] or [xCreate] methods of a [virtual table] implementation
** identify that virtual table as being safe to use from within triggers ** identify that virtual table as being safe to use from within triggers
** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
** virtual table can do no serious harm even if it is controlled by a ** virtual table can do no serious harm even if it is controlled by a
@ -10136,7 +10207,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
** </table> ** </table>
** **
** ^For the purposes of comparing virtual table output values to see if the ** ^For the purposes of comparing virtual table output values to see if the
** values are same value for sorting purposes, two NULL values are considered ** values are the same value for sorting purposes, two NULL values are considered
** to be the same. In other words, the comparison operator is "IS" ** to be the same. In other words, the comparison operator is "IS"
** (or "IS NOT DISTINCT FROM") and not "==". ** (or "IS NOT DISTINCT FROM") and not "==".
** **
@ -10146,7 +10217,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
** **
** ^A virtual table implementation is always free to return rows in any order ** ^A virtual table implementation is always free to return rows in any order
** it wants, as long as the "orderByConsumed" flag is not set. ^When the ** it wants, as long as the "orderByConsumed" flag is not set. ^When the
** the "orderByConsumed" flag is unset, the query planner will add extra ** "orderByConsumed" flag is unset, the query planner will add extra
** [bytecode] to ensure that the final results returned by the SQL query are ** [bytecode] to ensure that the final results returned by the SQL query are
** ordered correctly. The use of the "orderByConsumed" flag and the ** ordered correctly. The use of the "orderByConsumed" flag and the
** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful ** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
@ -10243,7 +10314,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
** sqlite3_vtab_in_next(X,P) should be one of the parameters to the ** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
** xFilter method which invokes these routines, and specifically ** xFilter method which invokes these routines, and specifically
** a parameter that was previously selected for all-at-once IN constraint ** a parameter that was previously selected for all-at-once IN constraint
** processing use the [sqlite3_vtab_in()] interface in the ** processing using the [sqlite3_vtab_in()] interface in the
** [xBestIndex|xBestIndex method]. ^(If the X parameter is not ** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
** an xFilter argument that was selected for all-at-once IN constraint ** an xFilter argument that was selected for all-at-once IN constraint
** processing, then these routines return [SQLITE_ERROR].)^ ** processing, then these routines return [SQLITE_ERROR].)^
@ -10298,7 +10369,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V) ** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th ** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
** constraint is not available. ^The sqlite3_vtab_rhs_value() interface ** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
** can return an result code other than SQLITE_OK or SQLITE_NOTFOUND if ** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if
** something goes wrong. ** something goes wrong.
** **
** The sqlite3_vtab_rhs_value() interface is usually only successful if ** The sqlite3_vtab_rhs_value() interface is usually only successful if
@ -10326,8 +10397,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
** KEYWORDS: {conflict resolution mode} ** KEYWORDS: {conflict resolution mode}
** **
** These constants are returned by [sqlite3_vtab_on_conflict()] to ** These constants are returned by [sqlite3_vtab_on_conflict()] to
** inform a [virtual table] implementation what the [ON CONFLICT] mode ** inform a [virtual table] implementation of the [ON CONFLICT] mode
** is for the SQL statement being evaluated. ** for the SQL statement being evaluated.
** **
** Note that the [SQLITE_IGNORE] constant is also used as a potential ** Note that the [SQLITE_IGNORE] constant is also used as a potential
** return value from the [sqlite3_set_authorizer()] callback and that ** return value from the [sqlite3_set_authorizer()] callback and that
@ -10367,39 +10438,39 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt> ** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
** <dd>^The "double" variable pointed to by the V parameter will be set to the ** <dd>^The "double" variable pointed to by the V parameter will be set to the
** query planner's estimate for the average number of rows output from each ** query planner's estimate for the average number of rows output from each
** iteration of the X-th loop. If the query planner's estimates was accurate, ** iteration of the X-th loop. If the query planner's estimate was accurate,
** then this value will approximate the quotient NVISIT/NLOOP and the ** then this value will approximate the quotient NVISIT/NLOOP and the
** product of this value for all prior loops with the same SELECTID will ** product of this value for all prior loops with the same SELECTID will
** be the NLOOP value for the current loop. ** be the NLOOP value for the current loop.</dd>
** **
** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt> ** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
** <dd>^The "const char *" variable pointed to by the V parameter will be set ** <dd>^The "const char *" variable pointed to by the V parameter will be set
** to a zero-terminated UTF-8 string containing the name of the index or table ** to a zero-terminated UTF-8 string containing the name of the index or table
** used for the X-th loop. ** used for the X-th loop.</dd>
** **
** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt> ** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
** <dd>^The "const char *" variable pointed to by the V parameter will be set ** <dd>^The "const char *" variable pointed to by the V parameter will be set
** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN] ** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
** description for the X-th loop. ** description for the X-th loop.</dd>
** **
** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt> ** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
** <dd>^The "int" variable pointed to by the V parameter will be set to the ** <dd>^The "int" variable pointed to by the V parameter will be set to the
** id for the X-th query plan element. The id value is unique within the ** id for the X-th query plan element. The id value is unique within the
** statement. The select-id is the same value as is output in the first ** statement. The select-id is the same value as is output in the first
** column of an [EXPLAIN QUERY PLAN] query. ** column of an [EXPLAIN QUERY PLAN] query.</dd>
** **
** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt> ** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
** <dd>The "int" variable pointed to by the V parameter will be set to the ** <dd>The "int" variable pointed to by the V parameter will be set to the
** the id of the parent of the current query element, if applicable, or ** id of the parent of the current query element, if applicable, or
** to zero if the query element has no parent. This is the same value as ** to zero if the query element has no parent. This is the same value as
** returned in the second column of an [EXPLAIN QUERY PLAN] query. ** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>
** **
** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt> ** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
** <dd>The sqlite3_int64 output value is set to the number of cycles, ** <dd>The sqlite3_int64 output value is set to the number of cycles,
** according to the processor time-stamp counter, that elapsed while the ** according to the processor time-stamp counter, that elapsed while the
** query element was being processed. This value is not available for ** query element was being processed. This value is not available for
** all query elements - if it is unavailable the output variable is ** all query elements - if it is unavailable the output variable is
** set to -1. ** set to -1.</dd>
** </dl> ** </dl>
*/ */
#define SQLITE_SCANSTAT_NLOOP 0 #define SQLITE_SCANSTAT_NLOOP 0
@ -10440,8 +10511,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter. ** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
** **
** Parameter "idx" identifies the specific query element to retrieve statistics ** Parameter "idx" identifies the specific query element to retrieve statistics
** for. Query elements are numbered starting from zero. A value of -1 may be ** for. Query elements are numbered starting from zero. A value of -1 may
** to query for statistics regarding the entire query. ^If idx is out of range ** retrieve statistics for the entire query. ^If idx is out of range
** - less than -1 or greater than or equal to the total number of query ** - less than -1 or greater than or equal to the total number of query
** elements used to implement the statement - a non-zero value is returned and ** elements used to implement the statement - a non-zero value is returned and
** the variable that pOut points to is unchanged. ** the variable that pOut points to is unchanged.
@ -10484,7 +10555,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
** METHOD: sqlite3 ** METHOD: sqlite3
** **
** ^If a write-transaction is open on [database connection] D when the ** ^If a write-transaction is open on [database connection] D when the
** [sqlite3_db_cacheflush(D)] interface invoked, any dirty ** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty
** pages in the pager-cache that are not currently in use are written out ** pages in the pager-cache that are not currently in use are written out
** to disk. A dirty page may be in use if a database cursor created by an ** to disk. A dirty page may be in use if a database cursor created by an
** active SQL statement is reading from it, or if it is page 1 of a database ** active SQL statement is reading from it, or if it is page 1 of a database
@ -10598,8 +10669,8 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
** triggers; and so forth. ** triggers; and so forth.
** **
** When the [sqlite3_blob_write()] API is used to update a blob column, ** When the [sqlite3_blob_write()] API is used to update a blob column,
** the pre-update hook is invoked with SQLITE_DELETE. This is because the ** the pre-update hook is invoked with SQLITE_DELETE, because
** in this case the new values are not available. In this case, when a ** the new values are not yet available. In this case, when a
** callback made with op==SQLITE_DELETE is actually a write using the ** callback made with op==SQLITE_DELETE is actually a write using the
** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
** the index of the column being written. In other cases, where the ** the index of the column being written. In other cases, where the
@ -10852,7 +10923,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
** For an ordinary on-disk database file, the serialization is just a ** For an ordinary on-disk database file, the serialization is just a
** copy of the disk file. For an in-memory database or a "TEMP" database, ** copy of the disk file. For an in-memory database or a "TEMP" database,
** the serialization is the same sequence of bytes which would be written ** the serialization is the same sequence of bytes which would be written
** to disk if that database where backed up to disk. ** to disk if that database were backed up to disk.
** **
** The usual case is that sqlite3_serialize() copies the serialization of ** The usual case is that sqlite3_serialize() copies the serialization of
** the database into memory obtained from [sqlite3_malloc64()] and returns ** the database into memory obtained from [sqlite3_malloc64()] and returns
@ -10861,7 +10932,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations ** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
** are made, and the sqlite3_serialize() function will return a pointer ** are made, and the sqlite3_serialize() function will return a pointer
** to the contiguous memory representation of the database that SQLite ** to the contiguous memory representation of the database that SQLite
** is currently using for that database, or NULL if the no such contiguous ** is currently using for that database, or NULL if no such contiguous
** memory representation of the database exists. A contiguous memory ** memory representation of the database exists. A contiguous memory
** representation of the database will usually only exist if there has ** representation of the database will usually only exist if there has
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
@ -10932,7 +11003,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
** database is currently in a read transaction or is involved in a backup ** database is currently in a read transaction or is involved in a backup
** operation. ** operation.
** **
** It is not possible to deserialized into the TEMP database. If the ** It is not possible to deserialize into the TEMP database. If the
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the ** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
** function returns SQLITE_ERROR. ** function returns SQLITE_ERROR.
** **
@ -10954,7 +11025,7 @@ SQLITE_API int sqlite3_deserialize(
sqlite3 *db, /* The database connection */ sqlite3 *db, /* The database connection */
const char *zSchema, /* Which DB to reopen with the deserialization */ const char *zSchema, /* Which DB to reopen with the deserialization */
unsigned char *pData, /* The serialized database content */ unsigned char *pData, /* The serialized database content */
sqlite3_int64 szDb, /* Number bytes in the deserialization */ sqlite3_int64 szDb, /* Number of bytes in the deserialization */
sqlite3_int64 szBuf, /* Total size of buffer pData[] */ sqlite3_int64 szBuf, /* Total size of buffer pData[] */
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */ unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
); );
@ -10962,7 +11033,7 @@ SQLITE_API int sqlite3_deserialize(
/* /*
** CAPI3REF: Flags for sqlite3_deserialize() ** CAPI3REF: Flags for sqlite3_deserialize()
** **
** The following are allowed values for 6th argument (the F argument) to ** The following are allowed values for the 6th argument (the F argument) to
** the [sqlite3_deserialize(D,S,P,N,M,F)] interface. ** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
** **
** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization ** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
@ -11487,9 +11558,10 @@ SQLITE_API void sqlite3session_table_filter(
** is inserted while a session object is enabled, then later deleted while ** is inserted while a session object is enabled, then later deleted while
** the same session object is disabled, no INSERT record will appear in the ** the same session object is disabled, no INSERT record will appear in the
** changeset, even though the delete took place while the session was disabled. ** changeset, even though the delete took place while the session was disabled.
** Or, if one field of a row is updated while a session is disabled, and ** Or, if one field of a row is updated while a session is enabled, and
** another field of the same row is updated while the session is enabled, the ** then another field of the same row is updated while the session is disabled,
** resulting changeset will contain an UPDATE change that updates both fields. ** the resulting changeset will contain an UPDATE change that updates both
** fields.
*/ */
SQLITE_API int sqlite3session_changeset( SQLITE_API int sqlite3session_changeset(
sqlite3_session *pSession, /* Session object */ sqlite3_session *pSession, /* Session object */
@ -11561,8 +11633,9 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
** database zFrom the contents of the two compatible tables would be ** database zFrom the contents of the two compatible tables would be
** identical. ** identical.
** **
** It an error if database zFrom does not exist or does not contain the ** Unless the call to this function is a no-op as described above, it is an
** required compatible table. ** error if database zFrom does not exist or does not contain the required
** compatible table.
** **
** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite
** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
@ -11697,7 +11770,7 @@ SQLITE_API int sqlite3changeset_start_v2(
** The following flags may passed via the 4th parameter to ** The following flags may passed via the 4th parameter to
** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]: ** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
** **
** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> ** <dt>SQLITE_CHANGESETSTART_INVERT <dd>
** Invert the changeset while iterating through it. This is equivalent to ** Invert the changeset while iterating through it. This is equivalent to
** inverting a changeset using sqlite3changeset_invert() before applying it. ** inverting a changeset using sqlite3changeset_invert() before applying it.
** It is an error to specify this flag with a patchset. ** It is an error to specify this flag with a patchset.
@ -12012,19 +12085,6 @@ SQLITE_API int sqlite3changeset_concat(
void **ppOut /* OUT: Buffer containing output changeset */ void **ppOut /* OUT: Buffer containing output changeset */
); );
/*
** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
*/
SQLITE_API int sqlite3changeset_upgrade(
sqlite3 *db,
const char *zDb,
int nIn, const void *pIn, /* Input changeset */
int *pnOut, void **ppOut /* OUT: Inverse of input */
);
/* /*
** CAPI3REF: Changegroup Handle ** CAPI3REF: Changegroup Handle
** **

View File

@ -371,6 +371,8 @@ struct sqlite3_api_routines {
/* Version 3.44.0 and later */ /* Version 3.44.0 and later */
void *(*get_clientdata)(sqlite3*,const char*); void *(*get_clientdata)(sqlite3*,const char*);
int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*)); int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
/* Version 3.50.0 and later */
int (*setlk_timeout)(sqlite3*,int,int);
}; };
/* /*
@ -704,6 +706,8 @@ typedef int (*sqlite3_loadext_entry)(
/* Version 3.44.0 and later */ /* Version 3.44.0 and later */
#define sqlite3_get_clientdata sqlite3_api->get_clientdata #define sqlite3_get_clientdata sqlite3_api->get_clientdata
#define sqlite3_set_clientdata sqlite3_api->set_clientdata #define sqlite3_set_clientdata sqlite3_api->set_clientdata
/* Version 3.50.0 and later */
#define sqlite3_setlk_timeout sqlite3_api->setlk_timeout
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)

2
vendor/modules.txt vendored
View File

@ -636,7 +636,7 @@ github.com/mattn/go-runewidth
# github.com/mattn/go-shellwords v1.0.12 # github.com/mattn/go-shellwords v1.0.12
## explicit; go 1.13 ## explicit; go 1.13
github.com/mattn/go-shellwords github.com/mattn/go-shellwords
# github.com/mattn/go-sqlite3 v1.14.28 # github.com/mattn/go-sqlite3 v1.14.29
## explicit; go 1.19 ## explicit; go 1.19
github.com/mattn/go-sqlite3 github.com/mattn/go-sqlite3
# github.com/mdlayher/socket v0.5.1 # github.com/mdlayher/socket v0.5.1