extralite-bundle 2.12 → 2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -133,7 +133,7 @@ extern "C" {
133
133
  **
134
134
  ** Since [version 3.6.18] ([dateof:3.6.18]),
135
135
  ** SQLite source code has been stored in the
136
- ** <a href="http://www.fossil-scm.org/">Fossil configuration management
136
+ ** <a href="http://fossil-scm.org/">Fossil configuration management
137
137
  ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
138
138
  ** a string which identifies a particular check-in of SQLite
139
139
  ** within its configuration management system. ^The SQLITE_SOURCE_ID
@@ -146,9 +146,9 @@ extern "C" {
146
146
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147
147
  ** [sqlite_version()] and [sqlite_source_id()].
148
148
  */
149
- #define SQLITE_VERSION "3.49.0"
150
- #define SQLITE_VERSION_NUMBER 3049000
151
- #define SQLITE_SOURCE_ID "2025-02-06 11:55:18 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde"
149
+ #define SQLITE_VERSION "3.50.4"
150
+ #define SQLITE_VERSION_NUMBER 3050004
151
+ #define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
152
152
 
153
153
  /*
154
154
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -1163,6 +1163,12 @@ struct sqlite3_io_methods {
1163
1163
  ** the value that M is to be set to. Before returning, the 32-bit signed
1164
1164
  ** integer is overwritten with the previous value of M.
1165
1165
  **
1166
+ ** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
1167
+ ** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
1168
+ ** VFS to block when taking a SHARED lock to connect to a wal mode database.
1169
+ ** This is used to implement the functionality associated with
1170
+ ** SQLITE_SETLK_BLOCK_ON_CONNECT.
1171
+ **
1166
1172
  ** <li>[[SQLITE_FCNTL_DATA_VERSION]]
1167
1173
  ** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
1168
1174
  ** a database file. The argument is a pointer to a 32-bit unsigned integer.
@@ -1259,6 +1265,7 @@ struct sqlite3_io_methods {
1259
1265
  #define SQLITE_FCNTL_CKSM_FILE 41
1260
1266
  #define SQLITE_FCNTL_RESET_CACHE 42
1261
1267
  #define SQLITE_FCNTL_NULL_IO 43
1268
+ #define SQLITE_FCNTL_BLOCK_ON_CONNECT 44
1262
1269
 
1263
1270
  /* deprecated names */
1264
1271
  #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -1989,13 +1996,16 @@ struct sqlite3_mem_methods {
1989
1996
  **
1990
1997
  ** [[SQLITE_CONFIG_LOOKASIDE]] <dt>SQLITE_CONFIG_LOOKASIDE</dt>
1991
1998
  ** <dd> ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine
1992
- ** the default size of lookaside memory on each [database connection].
1999
+ ** the default size of [lookaside memory] on each [database connection].
1993
2000
  ** The first argument is the
1994
- ** size of each lookaside buffer slot and the second is the number of
1995
- ** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE
1996
- ** sets the <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
1997
- ** option to [sqlite3_db_config()] can be used to change the lookaside
1998
- ** configuration on individual connections.)^ </dd>
2001
+ ** size of each lookaside buffer slot ("sz") and the second is the number of
2002
+ ** slots allocated to each database connection ("cnt").)^
2003
+ ** ^(SQLITE_CONFIG_LOOKASIDE sets the <i>default</i> lookaside size.
2004
+ ** The [SQLITE_DBCONFIG_LOOKASIDE] option to [sqlite3_db_config()] can
2005
+ ** be used to change the lookaside configuration on individual connections.)^
2006
+ ** The [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to change the
2007
+ ** default lookaside configuration at compile-time.
2008
+ ** </dd>
1999
2009
  **
2000
2010
  ** [[SQLITE_CONFIG_PCACHE2]] <dt>SQLITE_CONFIG_PCACHE2</dt>
2001
2011
  ** <dd> ^(The SQLITE_CONFIG_PCACHE2 option takes a single argument which is
@@ -2232,31 +2242,50 @@ struct sqlite3_mem_methods {
2232
2242
  ** [[SQLITE_DBCONFIG_LOOKASIDE]]
2233
2243
  ** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
2234
2244
  ** <dd> The SQLITE_DBCONFIG_LOOKASIDE option is used to adjust the
2235
- ** configuration of the lookaside memory allocator within a database
2245
+ ** configuration of the [lookaside memory allocator] within a database
2236
2246
  ** connection.
2237
2247
  ** The arguments to the SQLITE_DBCONFIG_LOOKASIDE option are <i>not</i>
2238
2248
  ** in the [DBCONFIG arguments|usual format].
2239
2249
  ** The SQLITE_DBCONFIG_LOOKASIDE option takes three arguments, not two,
2240
2250
  ** so that a call to [sqlite3_db_config()] that uses SQLITE_DBCONFIG_LOOKASIDE
2241
2251
  ** should have a total of five parameters.
2242
- ** ^The first argument (the third parameter to [sqlite3_db_config()] is a
2252
+ ** <ol>
2253
+ ** <li><p>The first argument ("buf") is a
2243
2254
  ** pointer to a memory buffer to use for lookaside memory.
2244
- ** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
2245
- ** may be NULL in which case SQLite will allocate the
2246
- ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
2247
- ** size of each lookaside buffer slot. ^The third argument is the number of
2248
- ** slots. The size of the buffer in the first argument must be greater than
2249
- ** or equal to the product of the second and third arguments. The buffer
2250
- ** must be aligned to an 8-byte boundary. ^If the second argument to
2251
- ** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
2252
- ** rounded down to the next smaller multiple of 8. ^(The lookaside memory
2255
+ ** The first argument may be NULL in which case SQLite will allocate the
2256
+ ** lookaside buffer itself using [sqlite3_malloc()].
2257
+ ** <li><P>The second argument ("sz") is the
2258
+ ** size of each lookaside buffer slot. Lookaside is disabled if "sz"
2259
+ ** is less than 8. The "sz" argument should be a multiple of 8 less than
2260
+ ** 65536. If "sz" does not meet this constraint, it is reduced in size until
2261
+ ** it does.
2262
+ ** <li><p>The third argument ("cnt") is the number of slots. Lookaside is disabled
2263
+ ** if "cnt"is less than 1. The "cnt" value will be reduced, if necessary, so
2264
+ ** that the product of "sz" and "cnt" does not exceed 2,147,418,112. The "cnt"
2265
+ ** parameter is usually chosen so that the product of "sz" and "cnt" is less
2266
+ ** than 1,000,000.
2267
+ ** </ol>
2268
+ ** <p>If the "buf" argument is not NULL, then it must
2269
+ ** point to a memory buffer with a size that is greater than
2270
+ ** or equal to the product of "sz" and "cnt".
2271
+ ** The buffer must be aligned to an 8-byte boundary.
2272
+ ** The lookaside memory
2253
2273
  ** configuration for a database connection can only be changed when that
2254
2274
  ** connection is not currently using lookaside memory, or in other words
2255
- ** when the "current value" returned by
2256
- ** [sqlite3_db_status](D,[SQLITE_DBSTATUS_LOOKASIDE_USED],...) is zero.
2275
+ ** when the value returned by [SQLITE_DBSTATUS_LOOKASIDE_USED] is zero.
2257
2276
  ** Any attempt to change the lookaside memory configuration when lookaside
2258
2277
  ** memory is in use leaves the configuration unchanged and returns
2259
- ** [SQLITE_BUSY].)^</dd>
2278
+ ** [SQLITE_BUSY].
2279
+ ** If the "buf" argument is NULL and an attempt
2280
+ ** to allocate memory based on "sz" and "cnt" fails, then
2281
+ ** lookaside is silently disabled.
2282
+ ** <p>
2283
+ ** The [SQLITE_CONFIG_LOOKASIDE] configuration option can be used to set the
2284
+ ** default lookaside configuration at initialization. The
2285
+ ** [-DSQLITE_DEFAULT_LOOKASIDE] option can be used to set the default lookaside
2286
+ ** configuration at compile-time. Typical values for lookaside are 1200 for
2287
+ ** "sz" and 40 to 100 for "cnt".
2288
+ ** </dd>
2260
2289
  **
2261
2290
  ** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
2262
2291
  ** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
@@ -2993,6 +3022,44 @@ SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
2993
3022
  */
2994
3023
  SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
2995
3024
 
3025
+ /*
3026
+ ** CAPI3REF: Set the Setlk Timeout
3027
+ ** METHOD: sqlite3
3028
+ **
3029
+ ** This routine is only useful in SQLITE_ENABLE_SETLK_TIMEOUT builds. If
3030
+ ** the VFS supports blocking locks, it sets the timeout in ms used by
3031
+ ** eligible locks taken on wal mode databases by the specified database
3032
+ ** handle. In non-SQLITE_ENABLE_SETLK_TIMEOUT builds, or if the VFS does
3033
+ ** not support blocking locks, this function is a no-op.
3034
+ **
3035
+ ** Passing 0 to this function disables blocking locks altogether. Passing
3036
+ ** -1 to this function requests that the VFS blocks for a long time -
3037
+ ** indefinitely if possible. The results of passing any other negative value
3038
+ ** are undefined.
3039
+ **
3040
+ ** Internally, each SQLite database handle store two timeout values - the
3041
+ ** busy-timeout (used for rollback mode databases, or if the VFS does not
3042
+ ** support blocking locks) and the setlk-timeout (used for blocking locks
3043
+ ** on wal-mode databases). The sqlite3_busy_timeout() method sets both
3044
+ ** values, this function sets only the setlk-timeout value. Therefore,
3045
+ ** to configure separate busy-timeout and setlk-timeout values for a single
3046
+ ** database handle, call sqlite3_busy_timeout() followed by this function.
3047
+ **
3048
+ ** Whenever the number of connections to a wal mode database falls from
3049
+ ** 1 to 0, the last connection takes an exclusive lock on the database,
3050
+ ** then checkpoints and deletes the wal file. While it is doing this, any
3051
+ ** new connection that tries to read from the database fails with an
3052
+ ** SQLITE_BUSY error. Or, if the SQLITE_SETLK_BLOCK_ON_CONNECT flag is
3053
+ ** passed to this API, the new connection blocks until the exclusive lock
3054
+ ** has been released.
3055
+ */
3056
+ SQLITE_API int sqlite3_setlk_timeout(sqlite3*, int ms, int flags);
3057
+
3058
+ /*
3059
+ ** CAPI3REF: Flags for sqlite3_setlk_timeout()
3060
+ */
3061
+ #define SQLITE_SETLK_BLOCK_ON_CONNECT 0x01
3062
+
2996
3063
  /*
2997
3064
  ** CAPI3REF: Convenience Routines For Running Queries
2998
3065
  ** METHOD: sqlite3
@@ -4012,7 +4079,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
4012
4079
  **
4013
4080
  ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
4014
4081
  ** database filename D with corresponding journal file J and WAL file W and
4015
- ** with N URI parameters key/values pairs in the array P. The result from
4082
+ ** an array P of N URI Key/Value pairs. The result from
4016
4083
  ** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
4017
4084
  ** is safe to pass to routines like:
4018
4085
  ** <ul>
@@ -4693,7 +4760,7 @@ typedef struct sqlite3_context sqlite3_context;
4693
4760
  ** METHOD: sqlite3_stmt
4694
4761
  **
4695
4762
  ** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
4696
- ** literals may be replaced by a [parameter] that matches one of following
4763
+ ** literals may be replaced by a [parameter] that matches one of the following
4697
4764
  ** templates:
4698
4765
  **
4699
4766
  ** <ul>
@@ -4738,7 +4805,7 @@ typedef struct sqlite3_context sqlite3_context;
4738
4805
  **
4739
4806
  ** [[byte-order determination rules]] ^The byte-order of
4740
4807
  ** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF)
4741
- ** found in first character, which is removed, or in the absence of a BOM
4808
+ ** found in the first character, which is removed, or in the absence of a BOM
4742
4809
  ** the byte order is the native byte order of the host
4743
4810
  ** machine for sqlite3_bind_text16() or the byte order specified in
4744
4811
  ** the 6th parameter for sqlite3_bind_text64().)^
@@ -4758,7 +4825,7 @@ typedef struct sqlite3_context sqlite3_context;
4758
4825
  ** or sqlite3_bind_text16() or sqlite3_bind_text64() then
4759
4826
  ** that parameter must be the byte offset
4760
4827
  ** where the NUL terminator would occur assuming the string were NUL
4761
- ** terminated. If any NUL characters occurs at byte offsets less than
4828
+ ** terminated. If any NUL characters occur at byte offsets less than
4762
4829
  ** the value of the fourth parameter then the resulting string value will
4763
4830
  ** contain embedded NULs. The result of expressions involving strings
4764
4831
  ** with embedded NULs is undefined.
@@ -4970,7 +5037,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
4970
5037
  ** METHOD: sqlite3_stmt
4971
5038
  **
4972
5039
  ** ^These routines provide a means to determine the database, table, and
4973
- ** table column that is the origin of a particular result column in
5040
+ ** table column that is the origin of a particular result column in a
4974
5041
  ** [SELECT] statement.
4975
5042
  ** ^The name of the database or table or column can be returned as
4976
5043
  ** either a UTF-8 or UTF-16 string. ^The _database_ routines return
@@ -5108,7 +5175,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
5108
5175
  ** other than [SQLITE_ROW] before any subsequent invocation of
5109
5176
  ** sqlite3_step(). Failure to reset the prepared statement using
5110
5177
  ** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
5111
- ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
5178
+ ** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
5112
5179
  ** sqlite3_step() began
5113
5180
  ** calling [sqlite3_reset()] automatically in this circumstance rather
5114
5181
  ** than returning [SQLITE_MISUSE]. This is not considered a compatibility
@@ -5539,8 +5606,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5539
5606
  **
5540
5607
  ** For best security, the [SQLITE_DIRECTONLY] flag is recommended for
5541
5608
  ** all application-defined SQL functions that do not need to be
5542
- ** used inside of triggers, view, CHECK constraints, or other elements of
5543
- ** the database schema. This flags is especially recommended for SQL
5609
+ ** used inside of triggers, views, CHECK constraints, or other elements of
5610
+ ** the database schema. This flag is especially recommended for SQL
5544
5611
  ** functions that have side effects or reveal internal application state.
5545
5612
  ** Without this flag, an attacker might be able to modify the schema of
5546
5613
  ** a database file to include invocations of the function with parameters
@@ -5571,7 +5638,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
5571
5638
  ** [user-defined window functions|available here].
5572
5639
  **
5573
5640
  ** ^(If the final parameter to sqlite3_create_function_v2() or
5574
- ** sqlite3_create_window_function() is not NULL, then it is destructor for
5641
+ ** sqlite3_create_window_function() is not NULL, then it is the destructor for
5575
5642
  ** the application data pointer. The destructor is invoked when the function
5576
5643
  ** is deleted, either by being overloaded or when the database connection
5577
5644
  ** closes.)^ ^The destructor is also invoked if the call to
@@ -5971,7 +6038,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
5971
6038
  ** METHOD: sqlite3_value
5972
6039
  **
5973
6040
  ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value]
5974
- ** object D and returns a pointer to that copy. ^The [sqlite3_value] returned
6041
+ ** object V and returns a pointer to that copy. ^The [sqlite3_value] returned
5975
6042
  ** is a [protected sqlite3_value] object even if the input is not.
5976
6043
  ** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a
5977
6044
  ** memory allocation fails. ^If V is a [pointer value], then the result
@@ -6009,7 +6076,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*);
6009
6076
  ** allocation error occurs.
6010
6077
  **
6011
6078
  ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
6012
- ** determined by the N parameter on first successful call. Changing the
6079
+ ** determined by the N parameter on the first successful call. Changing the
6013
6080
  ** value of N in any subsequent call to sqlite3_aggregate_context() within
6014
6081
  ** the same aggregate function instance will not resize the memory
6015
6082
  ** allocation.)^ Within the xFinal callback, it is customary to set
@@ -6171,7 +6238,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi
6171
6238
  **
6172
6239
  ** Security Warning: These interfaces should not be exposed in scripting
6173
6240
  ** languages or in other circumstances where it might be possible for an
6174
- ** an attacker to invoke them. Any agent that can invoke these interfaces
6241
+ ** attacker to invoke them. Any agent that can invoke these interfaces
6175
6242
  ** can probably also take control of the process.
6176
6243
  **
6177
6244
  ** Database connection client data is only available for SQLite
@@ -6285,7 +6352,7 @@ typedef void (*sqlite3_destructor_type)(void*);
6285
6352
  ** pointed to by the 2nd parameter are taken as the application-defined
6286
6353
  ** function result. If the 3rd parameter is non-negative, then it
6287
6354
  ** must be the byte offset into the string where the NUL terminator would
6288
- ** appear if the string where NUL terminated. If any NUL characters occur
6355
+ ** appear if the string were NUL terminated. If any NUL characters occur
6289
6356
  ** in the string at a byte offset that is less than the value of the 3rd
6290
6357
  ** parameter, then the resulting string will contain embedded NULs and the
6291
6358
  ** result of expressions operating on strings with embedded NULs is undefined.
@@ -6343,7 +6410,7 @@ typedef void (*sqlite3_destructor_type)(void*);
6343
6410
  ** string and preferably a string literal. The sqlite3_result_pointer()
6344
6411
  ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
6345
6412
  **
6346
- ** If these routines are called from within the different thread
6413
+ ** If these routines are called from within a different thread
6347
6414
  ** than the one containing the application-defined function that received
6348
6415
  ** the [sqlite3_context] pointer, the results are undefined.
6349
6416
  */
@@ -6749,7 +6816,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
6749
6816
  ** METHOD: sqlite3
6750
6817
  **
6751
6818
  ** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name
6752
- ** for the N-th database on database connection D, or a NULL pointer of N is
6819
+ ** for the N-th database on database connection D, or a NULL pointer if N is
6753
6820
  ** out of range. An N value of 0 means the main database file. An N of 1 is
6754
6821
  ** the "temp" schema. Larger values of N correspond to various ATTACH-ed
6755
6822
  ** databases.
@@ -6844,7 +6911,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6844
6911
  ** <dd>The SQLITE_TXN_READ state means that the database is currently
6845
6912
  ** in a read transaction. Content has been read from the database file
6846
6913
  ** but nothing in the database file has changed. The transaction state
6847
- ** will advanced to SQLITE_TXN_WRITE if any changes occur and there are
6914
+ ** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are
6848
6915
  ** no other conflicting concurrent write transactions. The transaction
6849
6916
  ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or
6850
6917
  ** [COMMIT].</dd>
@@ -6853,7 +6920,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema);
6853
6920
  ** <dd>The SQLITE_TXN_WRITE state means that the database is currently
6854
6921
  ** in a write transaction. Content has been written to the database file
6855
6922
  ** but has not yet committed. The transaction state will change to
6856
- ** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6923
+ ** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].</dd>
6857
6924
  */
6858
6925
  #define SQLITE_TXN_NONE 0
6859
6926
  #define SQLITE_TXN_READ 1
@@ -7004,6 +7071,8 @@ SQLITE_API int sqlite3_autovacuum_pages(
7004
7071
  **
7005
7072
  ** ^The second argument is a pointer to the function to invoke when a
7006
7073
  ** row is updated, inserted or deleted in a rowid table.
7074
+ ** ^The update hook is disabled by invoking sqlite3_update_hook()
7075
+ ** with a NULL pointer as the second parameter.
7007
7076
  ** ^The first argument to the callback is a copy of the third argument
7008
7077
  ** to sqlite3_update_hook().
7009
7078
  ** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
@@ -7132,7 +7201,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
7132
7201
  ** CAPI3REF: Impose A Limit On Heap Size
7133
7202
  **
7134
7203
  ** These interfaces impose limits on the amount of heap memory that will be
7135
- ** by all database connections within a single process.
7204
+ ** used by all database connections within a single process.
7136
7205
  **
7137
7206
  ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
7138
7207
  ** soft limit on the amount of heap memory that may be allocated by SQLite.
@@ -7190,7 +7259,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*);
7190
7259
  ** </ul>)^
7191
7260
  **
7192
7261
  ** The circumstances under which SQLite will enforce the heap limits may
7193
- ** changes in future releases of SQLite.
7262
+ ** change in future releases of SQLite.
7194
7263
  */
7195
7264
  SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
7196
7265
  SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N);
@@ -7305,8 +7374,8 @@ SQLITE_API int sqlite3_table_column_metadata(
7305
7374
  ** ^The entry point is zProc.
7306
7375
  ** ^(zProc may be 0, in which case SQLite will try to come up with an
7307
7376
  ** entry point name on its own. It first tries "sqlite3_extension_init".
7308
- ** If that does not work, it constructs a name "sqlite3_X_init" where the
7309
- ** X is consists of the lower-case equivalent of all ASCII alphabetic
7377
+ ** If that does not work, it constructs a name "sqlite3_X_init" where
7378
+ ** X consists of the lower-case equivalent of all ASCII alphabetic
7310
7379
  ** characters in the filename from the last "/" to the first following
7311
7380
  ** "." and omitting any initial "lib".)^
7312
7381
  ** ^The sqlite3_load_extension() interface returns
@@ -7377,7 +7446,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
7377
7446
  ** ^(Even though the function prototype shows that xEntryPoint() takes
7378
7447
  ** no arguments and returns void, SQLite invokes xEntryPoint() with three
7379
7448
  ** arguments and expects an integer result as if the signature of the
7380
- ** entry point where as follows:
7449
+ ** entry point were as follows:
7381
7450
  **
7382
7451
  ** <blockquote><pre>
7383
7452
  ** &nbsp; int xEntryPoint(
@@ -7541,7 +7610,7 @@ struct sqlite3_module {
7541
7610
  ** virtual table and might not be checked again by the byte code.)^ ^(The
7542
7611
  ** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
7543
7612
  ** is left in its default setting of false, the constraint will always be
7544
- ** checked separately in byte code. If the omit flag is change to true, then
7613
+ ** checked separately in byte code. If the omit flag is changed to true, then
7545
7614
  ** the constraint may or may not be checked in byte code. In other words,
7546
7615
  ** when the omit flag is true there is no guarantee that the constraint will
7547
7616
  ** not be checked again using byte code.)^
@@ -7567,7 +7636,7 @@ struct sqlite3_module {
7567
7636
  ** The xBestIndex method may optionally populate the idxFlags field with a
7568
7637
  ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
7569
7638
  ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
7570
- ** output to show the idxNum has hex instead of as decimal. Another flag is
7639
+ ** output to show the idxNum as hex instead of as decimal. Another flag is
7571
7640
  ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
7572
7641
  ** return at most one row.
7573
7642
  **
@@ -7708,7 +7777,7 @@ struct sqlite3_index_info {
7708
7777
  ** the implementation of the [virtual table module]. ^The fourth
7709
7778
  ** parameter is an arbitrary client data pointer that is passed through
7710
7779
  ** into the [xCreate] and [xConnect] methods of the virtual table module
7711
- ** when a new virtual table is be being created or reinitialized.
7780
+ ** when a new virtual table is being created or reinitialized.
7712
7781
  **
7713
7782
  ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
7714
7783
  ** is a pointer to a destructor for the pClientData. ^SQLite will
@@ -7873,7 +7942,7 @@ typedef struct sqlite3_blob sqlite3_blob;
7873
7942
  ** in *ppBlob. Otherwise an [error code] is returned and, unless the error
7874
7943
  ** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
7875
7944
  ** the API is not misused, it is always safe to call [sqlite3_blob_close()]
7876
- ** on *ppBlob after this function it returns.
7945
+ ** on *ppBlob after this function returns.
7877
7946
  **
7878
7947
  ** This function fails with SQLITE_ERROR if any of the following are true:
7879
7948
  ** <ul>
@@ -7993,7 +8062,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
7993
8062
  **
7994
8063
  ** ^Returns the size in bytes of the BLOB accessible via the
7995
8064
  ** successfully opened [BLOB handle] in its only argument. ^The
7996
- ** incremental blob I/O routines can only read or overwriting existing
8065
+ ** incremental blob I/O routines can only read or overwrite existing
7997
8066
  ** blob content; they cannot change the size of a blob.
7998
8067
  **
7999
8068
  ** This routine only works on a [BLOB handle] which has been created
@@ -8143,7 +8212,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
8143
8212
  ** ^The sqlite3_mutex_alloc() routine allocates a new
8144
8213
  ** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc()
8145
8214
  ** routine returns NULL if it is unable to allocate the requested
8146
- ** mutex. The argument to sqlite3_mutex_alloc() must one of these
8215
+ ** mutex. The argument to sqlite3_mutex_alloc() must be one of these
8147
8216
  ** integer constants:
8148
8217
  **
8149
8218
  ** <ul>
@@ -8376,7 +8445,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
8376
8445
  ** CAPI3REF: Retrieve the mutex for a database connection
8377
8446
  ** METHOD: sqlite3
8378
8447
  **
8379
- ** ^This interface returns a pointer the [sqlite3_mutex] object that
8448
+ ** ^This interface returns a pointer to the [sqlite3_mutex] object that
8380
8449
  ** serializes access to the [database connection] given in the argument
8381
8450
  ** when the [threading mode] is Serialized.
8382
8451
  ** ^If the [threading mode] is Single-thread or Multi-thread then this
@@ -8499,7 +8568,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
8499
8568
  ** CAPI3REF: SQL Keyword Checking
8500
8569
  **
8501
8570
  ** These routines provide access to the set of SQL language keywords
8502
- ** recognized by SQLite. Applications can uses these routines to determine
8571
+ ** recognized by SQLite. Applications can use these routines to determine
8503
8572
  ** whether or not a specific identifier needs to be escaped (for example,
8504
8573
  ** by enclosing in double-quotes) so as not to confuse the parser.
8505
8574
  **
@@ -8667,7 +8736,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*);
8667
8736
  ** content of the dynamic string under construction in X. The value
8668
8737
  ** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X
8669
8738
  ** and might be freed or altered by any subsequent method on the same
8670
- ** [sqlite3_str] object. Applications must not used the pointer returned
8739
+ ** [sqlite3_str] object. Applications must not use the pointer returned by
8671
8740
  ** [sqlite3_str_value(X)] after any subsequent method call on the same
8672
8741
  ** object. ^Applications may change the content of the string returned
8673
8742
  ** by [sqlite3_str_value(X)] as long as they do not write into any bytes
@@ -8753,7 +8822,7 @@ SQLITE_API int sqlite3_status64(
8753
8822
  ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
8754
8823
  ** buffer and where forced to overflow to [sqlite3_malloc()]. The
8755
8824
  ** returned value includes allocations that overflowed because they
8756
- ** where too large (they were larger than the "sz" parameter to
8825
+ ** were too large (they were larger than the "sz" parameter to
8757
8826
  ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
8758
8827
  ** no space was left in the page cache.</dd>)^
8759
8828
  **
@@ -8837,28 +8906,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8837
8906
  ** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
8838
8907
  ** <dd>This parameter returns the number of malloc attempts that were
8839
8908
  ** satisfied using lookaside memory. Only the high-water value is meaningful;
8840
- ** the current value is always zero.)^
8909
+ ** the current value is always zero.</dd>)^
8841
8910
  **
8842
8911
  ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]]
8843
8912
  ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
8844
- ** <dd>This parameter returns the number malloc attempts that might have
8913
+ ** <dd>This parameter returns the number of malloc attempts that might have
8845
8914
  ** been satisfied using lookaside memory but failed due to the amount of
8846
8915
  ** memory requested being larger than the lookaside slot size.
8847
8916
  ** Only the high-water value is meaningful;
8848
- ** the current value is always zero.)^
8917
+ ** the current value is always zero.</dd>)^
8849
8918
  **
8850
8919
  ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]]
8851
8920
  ** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
8852
- ** <dd>This parameter returns the number malloc attempts that might have
8921
+ ** <dd>This parameter returns the number of malloc attempts that might have
8853
8922
  ** been satisfied using lookaside memory but failed due to all lookaside
8854
8923
  ** memory already being in use.
8855
8924
  ** Only the high-water value is meaningful;
8856
- ** the current value is always zero.)^
8925
+ ** the current value is always zero.</dd>)^
8857
8926
  **
8858
8927
  ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
8859
8928
  ** <dd>This parameter returns the approximate number of bytes of heap
8860
8929
  ** memory used by all pager caches associated with the database connection.)^
8861
8930
  ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
8931
+ ** </dd>
8862
8932
  **
8863
8933
  ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
8864
8934
  ** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>
@@ -8867,10 +8937,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8867
8937
  ** memory used by that pager cache is divided evenly between the attached
8868
8938
  ** connections.)^ In other words, if none of the pager caches associated
8869
8939
  ** with the database connection are shared, this request returns the same
8870
- ** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are
8940
+ ** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are
8871
8941
  ** shared, the value returned by this call will be smaller than that returned
8872
8942
  ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
8873
- ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.
8943
+ ** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.</dd>
8874
8944
  **
8875
8945
  ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
8876
8946
  ** <dd>This parameter returns the approximate number of bytes of heap
@@ -8880,6 +8950,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8880
8950
  ** schema memory is shared with other database connections due to
8881
8951
  ** [shared cache mode] being enabled.
8882
8952
  ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
8953
+ ** </dd>
8883
8954
  **
8884
8955
  ** [[SQLITE_DBSTATUS_STMT_USED]] ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
8885
8956
  ** <dd>This parameter returns the approximate number of bytes of heap
@@ -8916,7 +8987,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
8916
8987
  ** been written to disk in the middle of a transaction due to the page
8917
8988
  ** cache overflowing. Transactions are more efficient if they are written
8918
8989
  ** to disk all at once. When pages spill mid-transaction, that introduces
8919
- ** additional overhead. This parameter can be used help identify
8990
+ ** additional overhead. This parameter can be used to help identify
8920
8991
  ** inefficiencies that can be resolved by increasing the cache size.
8921
8992
  ** </dd>
8922
8993
  **
@@ -8987,13 +9058,13 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
8987
9058
  ** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>
8988
9059
  ** <dd>^This is the number of sort operations that have occurred.
8989
9060
  ** A non-zero value in this counter may indicate an opportunity to
8990
- ** improvement performance through careful use of indices.</dd>
9061
+ ** improve performance through careful use of indices.</dd>
8991
9062
  **
8992
9063
  ** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
8993
9064
  ** <dd>^This is the number of rows inserted into transient indices that
8994
9065
  ** were created automatically in order to help joins run faster.
8995
9066
  ** A non-zero value in this counter may indicate an opportunity to
8996
- ** improvement performance by adding permanent indices that do not
9067
+ ** improve performance by adding permanent indices that do not
8997
9068
  ** need to be reinitialized each time the statement is run.</dd>
8998
9069
  **
8999
9070
  ** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>
@@ -9002,19 +9073,19 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
9002
9073
  ** to 2147483647. The number of virtual machine operations can be
9003
9074
  ** used as a proxy for the total work done by the prepared statement.
9004
9075
  ** If the number of virtual machine operations exceeds 2147483647
9005
- ** then the value returned by this statement status code is undefined.
9076
+ ** then the value returned by this statement status code is undefined.</dd>
9006
9077
  **
9007
9078
  ** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>
9008
9079
  ** <dd>^This is the number of times that the prepare statement has been
9009
9080
  ** automatically regenerated due to schema changes or changes to
9010
- ** [bound parameters] that might affect the query plan.
9081
+ ** [bound parameters] that might affect the query plan.</dd>
9011
9082
  **
9012
9083
  ** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>
9013
9084
  ** <dd>^This is the number of times that the prepared statement has
9014
9085
  ** been run. A single "run" for the purposes of this counter is one
9015
9086
  ** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
9016
9087
  ** The counter is incremented on the first [sqlite3_step()] call of each
9017
- ** cycle.
9088
+ ** cycle.</dd>
9018
9089
  **
9019
9090
  ** [[SQLITE_STMTSTATUS_FILTER_MISS]]
9020
9091
  ** [[SQLITE_STMTSTATUS_FILTER HIT]]
@@ -9024,7 +9095,7 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
9024
9095
  ** step was bypassed because a Bloom filter returned not-found. The
9025
9096
  ** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
9026
9097
  ** times that the Bloom filter returned a find, and thus the join step
9027
- ** had to be processed as normal.
9098
+ ** had to be processed as normal.</dd>
9028
9099
  **
9029
9100
  ** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>
9030
9101
  ** <dd>^This is the approximate number of bytes of heap memory
@@ -9129,9 +9200,9 @@ struct sqlite3_pcache_page {
9129
9200
  ** SQLite will typically create one cache instance for each open database file,
9130
9201
  ** though this is not guaranteed. ^The
9131
9202
  ** first parameter, szPage, is the size in bytes of the pages that must
9132
- ** be allocated by the cache. ^szPage will always a power of two. ^The
9203
+ ** be allocated by the cache. ^szPage will always be a power of two. ^The
9133
9204
  ** second parameter szExtra is a number of bytes of extra storage
9134
- ** associated with each page cache entry. ^The szExtra parameter will
9205
+ ** associated with each page cache entry. ^The szExtra parameter will be
9135
9206
  ** a number less than 250. SQLite will use the
9136
9207
  ** extra szExtra bytes on each page to store metadata about the underlying
9137
9208
  ** database page on disk. The value passed into szExtra depends
@@ -9139,17 +9210,17 @@ struct sqlite3_pcache_page {
9139
9210
  ** ^The third argument to xCreate(), bPurgeable, is true if the cache being
9140
9211
  ** created will be used to cache database pages of a file stored on disk, or
9141
9212
  ** false if it is used for an in-memory database. The cache implementation
9142
- ** does not have to do anything special based with the value of bPurgeable;
9213
+ ** does not have to do anything special based upon the value of bPurgeable;
9143
9214
  ** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
9144
9215
  ** never invoke xUnpin() except to deliberately delete a page.
9145
9216
  ** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
9146
9217
  ** false will always have the "discard" flag set to true.
9147
- ** ^Hence, a cache created with bPurgeable false will
9218
+ ** ^Hence, a cache created with bPurgeable set to false will
9148
9219
  ** never contain any unpinned pages.
9149
9220
  **
9150
9221
  ** [[the xCachesize() page cache method]]
9151
9222
  ** ^(The xCachesize() method may be called at any time by SQLite to set the
9152
- ** suggested maximum cache-size (number of pages stored by) the cache
9223
+ ** suggested maximum cache-size (number of pages stored) for the cache
9153
9224
  ** instance passed as the first argument. This is the value configured using
9154
9225
  ** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable
9155
9226
  ** parameter, the implementation is not required to do anything with this
@@ -9176,12 +9247,12 @@ struct sqlite3_pcache_page {
9176
9247
  ** implementation must return a pointer to the page buffer with its content
9177
9248
  ** intact. If the requested page is not already in the cache, then the
9178
9249
  ** cache implementation should use the value of the createFlag
9179
- ** parameter to help it determined what action to take:
9250
+ ** parameter to help it determine what action to take:
9180
9251
  **
9181
9252
  ** <table border=1 width=85% align=center>
9182
9253
  ** <tr><th> createFlag <th> Behavior when page is not already in cache
9183
9254
  ** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
9184
- ** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
9255
+ ** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.
9185
9256
  ** Otherwise return NULL.
9186
9257
  ** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
9187
9258
  ** NULL if allocating a new page is effectively impossible.
@@ -9198,7 +9269,7 @@ struct sqlite3_pcache_page {
9198
9269
  ** as its second argument. If the third parameter, discard, is non-zero,
9199
9270
  ** then the page must be evicted from the cache.
9200
9271
  ** ^If the discard parameter is
9201
- ** zero, then the page may be discarded or retained at the discretion of
9272
+ ** zero, then the page may be discarded or retained at the discretion of the
9202
9273
  ** page cache implementation. ^The page cache implementation
9203
9274
  ** may choose to evict unpinned pages at any time.
9204
9275
  **
@@ -9216,7 +9287,7 @@ struct sqlite3_pcache_page {
9216
9287
  ** When SQLite calls the xTruncate() method, the cache must discard all
9217
9288
  ** existing cache entries with page numbers (keys) greater than or equal
9218
9289
  ** to the value of the iLimit parameter passed to xTruncate(). If any
9219
- ** of these pages are pinned, they are implicitly unpinned, meaning that
9290
+ ** of these pages are pinned, they become implicitly unpinned, meaning that
9220
9291
  ** they can be safely discarded.
9221
9292
  **
9222
9293
  ** [[the xDestroy() page cache method]]
@@ -9396,7 +9467,7 @@ typedef struct sqlite3_backup sqlite3_backup;
9396
9467
  ** external process or via a database connection other than the one being
9397
9468
  ** used by the backup operation, then the backup will be automatically
9398
9469
  ** restarted by the next call to sqlite3_backup_step(). ^If the source
9399
- ** database is modified by the using the same database connection as is used
9470
+ ** database is modified by using the same database connection as is used
9400
9471
  ** by the backup operation, then the backup database is automatically
9401
9472
  ** updated at the same time.
9402
9473
  **
@@ -9413,7 +9484,7 @@ typedef struct sqlite3_backup sqlite3_backup;
9413
9484
  ** and may not be used following a call to sqlite3_backup_finish().
9414
9485
  **
9415
9486
  ** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
9416
- ** sqlite3_backup_step() errors occurred, regardless or whether or not
9487
+ ** sqlite3_backup_step() errors occurred, regardless of whether or not
9417
9488
  ** sqlite3_backup_step() completed.
9418
9489
  ** ^If an out-of-memory condition or IO error occurred during any prior
9419
9490
  ** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
@@ -9515,7 +9586,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9515
9586
  ** application receives an SQLITE_LOCKED error, it may call the
9516
9587
  ** sqlite3_unlock_notify() method with the blocked connection handle as
9517
9588
  ** the first argument to register for a callback that will be invoked
9518
- ** when the blocking connections current transaction is concluded. ^The
9589
+ ** when the blocking connection's current transaction is concluded. ^The
9519
9590
  ** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
9520
9591
  ** call that concludes the blocking connection's transaction.
9521
9592
  **
@@ -9535,7 +9606,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9535
9606
  ** blocked connection already has a registered unlock-notify callback,
9536
9607
  ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
9537
9608
  ** called with a NULL pointer as its second argument, then any existing
9538
- ** unlock-notify callback is canceled. ^The blocked connections
9609
+ ** unlock-notify callback is canceled. ^The blocked connection's
9539
9610
  ** unlock-notify callback may also be canceled by closing the blocked
9540
9611
  ** connection using [sqlite3_close()].
9541
9612
  **
@@ -9933,7 +10004,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
9933
10004
  ** support constraints. In this configuration (which is the default) if
9934
10005
  ** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire
9935
10006
  ** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
9936
- ** specified as part of the users SQL statement, regardless of the actual
10007
+ ** specified as part of the user's SQL statement, regardless of the actual
9937
10008
  ** ON CONFLICT mode specified.
9938
10009
  **
9939
10010
  ** If X is non-zero, then the virtual table implementation guarantees
@@ -9967,7 +10038,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
9967
10038
  ** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
9968
10039
  ** <dd>Calls of the form
9969
10040
  ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
9970
- ** the [xConnect] or [xCreate] methods of a [virtual table] implementation
10041
+ ** [xConnect] or [xCreate] methods of a [virtual table] implementation
9971
10042
  ** identify that virtual table as being safe to use from within triggers
9972
10043
  ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
9973
10044
  ** virtual table can do no serious harm even if it is controlled by a
@@ -10135,7 +10206,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
10135
10206
  ** </table>
10136
10207
  **
10137
10208
  ** ^For the purposes of comparing virtual table output values to see if the
10138
- ** values are same value for sorting purposes, two NULL values are considered
10209
+ ** values are the same value for sorting purposes, two NULL values are considered
10139
10210
  ** to be the same. In other words, the comparison operator is "IS"
10140
10211
  ** (or "IS NOT DISTINCT FROM") and not "==".
10141
10212
  **
@@ -10145,7 +10216,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
10145
10216
  **
10146
10217
  ** ^A virtual table implementation is always free to return rows in any order
10147
10218
  ** it wants, as long as the "orderByConsumed" flag is not set. ^When the
10148
- ** the "orderByConsumed" flag is unset, the query planner will add extra
10219
+ ** "orderByConsumed" flag is unset, the query planner will add extra
10149
10220
  ** [bytecode] to ensure that the final results returned by the SQL query are
10150
10221
  ** ordered correctly. The use of the "orderByConsumed" flag and the
10151
10222
  ** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
@@ -10242,7 +10313,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
10242
10313
  ** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
10243
10314
  ** xFilter method which invokes these routines, and specifically
10244
10315
  ** a parameter that was previously selected for all-at-once IN constraint
10245
- ** processing use the [sqlite3_vtab_in()] interface in the
10316
+ ** processing using the [sqlite3_vtab_in()] interface in the
10246
10317
  ** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
10247
10318
  ** an xFilter argument that was selected for all-at-once IN constraint
10248
10319
  ** processing, then these routines return [SQLITE_ERROR].)^
@@ -10297,7 +10368,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
10297
10368
  ** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
10298
10369
  ** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
10299
10370
  ** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
10300
- ** can return an result code other than SQLITE_OK or SQLITE_NOTFOUND if
10371
+ ** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if
10301
10372
  ** something goes wrong.
10302
10373
  **
10303
10374
  ** The sqlite3_vtab_rhs_value() interface is usually only successful if
@@ -10325,8 +10396,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10325
10396
  ** KEYWORDS: {conflict resolution mode}
10326
10397
  **
10327
10398
  ** These constants are returned by [sqlite3_vtab_on_conflict()] to
10328
- ** inform a [virtual table] implementation what the [ON CONFLICT] mode
10329
- ** is for the SQL statement being evaluated.
10399
+ ** inform a [virtual table] implementation of the [ON CONFLICT] mode
10400
+ ** for the SQL statement being evaluated.
10330
10401
  **
10331
10402
  ** Note that the [SQLITE_IGNORE] constant is also used as a potential
10332
10403
  ** return value from the [sqlite3_set_authorizer()] callback and that
@@ -10366,39 +10437,39 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10366
10437
  ** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
10367
10438
  ** <dd>^The "double" variable pointed to by the V parameter will be set to the
10368
10439
  ** query planner's estimate for the average number of rows output from each
10369
- ** iteration of the X-th loop. If the query planner's estimates was accurate,
10440
+ ** iteration of the X-th loop. If the query planner's estimate was accurate,
10370
10441
  ** then this value will approximate the quotient NVISIT/NLOOP and the
10371
10442
  ** product of this value for all prior loops with the same SELECTID will
10372
- ** be the NLOOP value for the current loop.
10443
+ ** be the NLOOP value for the current loop.</dd>
10373
10444
  **
10374
10445
  ** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
10375
10446
  ** <dd>^The "const char *" variable pointed to by the V parameter will be set
10376
10447
  ** to a zero-terminated UTF-8 string containing the name of the index or table
10377
- ** used for the X-th loop.
10448
+ ** used for the X-th loop.</dd>
10378
10449
  **
10379
10450
  ** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
10380
10451
  ** <dd>^The "const char *" variable pointed to by the V parameter will be set
10381
10452
  ** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
10382
- ** description for the X-th loop.
10453
+ ** description for the X-th loop.</dd>
10383
10454
  **
10384
10455
  ** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
10385
10456
  ** <dd>^The "int" variable pointed to by the V parameter will be set to the
10386
10457
  ** id for the X-th query plan element. The id value is unique within the
10387
10458
  ** statement. The select-id is the same value as is output in the first
10388
- ** column of an [EXPLAIN QUERY PLAN] query.
10459
+ ** column of an [EXPLAIN QUERY PLAN] query.</dd>
10389
10460
  **
10390
10461
  ** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
10391
10462
  ** <dd>The "int" variable pointed to by the V parameter will be set to the
10392
- ** the id of the parent of the current query element, if applicable, or
10463
+ ** id of the parent of the current query element, if applicable, or
10393
10464
  ** to zero if the query element has no parent. This is the same value as
10394
- ** returned in the second column of an [EXPLAIN QUERY PLAN] query.
10465
+ ** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>
10395
10466
  **
10396
10467
  ** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
10397
10468
  ** <dd>The sqlite3_int64 output value is set to the number of cycles,
10398
10469
  ** according to the processor time-stamp counter, that elapsed while the
10399
10470
  ** query element was being processed. This value is not available for
10400
10471
  ** all query elements - if it is unavailable the output variable is
10401
- ** set to -1.
10472
+ ** set to -1.</dd>
10402
10473
  ** </dl>
10403
10474
  */
10404
10475
  #define SQLITE_SCANSTAT_NLOOP 0
@@ -10439,8 +10510,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10439
10510
  ** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
10440
10511
  **
10441
10512
  ** Parameter "idx" identifies the specific query element to retrieve statistics
10442
- ** for. Query elements are numbered starting from zero. A value of -1 may be
10443
- ** to query for statistics regarding the entire query. ^If idx is out of range
10513
+ ** for. Query elements are numbered starting from zero. A value of -1 may
10514
+ ** retrieve statistics for the entire query. ^If idx is out of range
10444
10515
  ** - less than -1 or greater than or equal to the total number of query
10445
10516
  ** elements used to implement the statement - a non-zero value is returned and
10446
10517
  ** the variable that pOut points to is unchanged.
@@ -10483,7 +10554,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
10483
10554
  ** METHOD: sqlite3
10484
10555
  **
10485
10556
  ** ^If a write-transaction is open on [database connection] D when the
10486
- ** [sqlite3_db_cacheflush(D)] interface invoked, any dirty
10557
+ ** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty
10487
10558
  ** pages in the pager-cache that are not currently in use are written out
10488
10559
  ** to disk. A dirty page may be in use if a database cursor created by an
10489
10560
  ** active SQL statement is reading from it, or if it is page 1 of a database
@@ -10597,8 +10668,8 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
10597
10668
  ** triggers; and so forth.
10598
10669
  **
10599
10670
  ** When the [sqlite3_blob_write()] API is used to update a blob column,
10600
- ** the pre-update hook is invoked with SQLITE_DELETE. This is because the
10601
- ** in this case the new values are not available. In this case, when a
10671
+ ** the pre-update hook is invoked with SQLITE_DELETE, because
10672
+ ** the new values are not yet available. In this case, when a
10602
10673
  ** callback made with op==SQLITE_DELETE is actually a write using the
10603
10674
  ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
10604
10675
  ** the index of the column being written. In other cases, where the
@@ -10851,7 +10922,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
10851
10922
  ** For an ordinary on-disk database file, the serialization is just a
10852
10923
  ** copy of the disk file. For an in-memory database or a "TEMP" database,
10853
10924
  ** the serialization is the same sequence of bytes which would be written
10854
- ** to disk if that database where backed up to disk.
10925
+ ** to disk if that database were backed up to disk.
10855
10926
  **
10856
10927
  ** The usual case is that sqlite3_serialize() copies the serialization of
10857
10928
  ** the database into memory obtained from [sqlite3_malloc64()] and returns
@@ -10860,7 +10931,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
10860
10931
  ** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
10861
10932
  ** are made, and the sqlite3_serialize() function will return a pointer
10862
10933
  ** to the contiguous memory representation of the database that SQLite
10863
- ** is currently using for that database, or NULL if the no such contiguous
10934
+ ** is currently using for that database, or NULL if no such contiguous
10864
10935
  ** memory representation of the database exists. A contiguous memory
10865
10936
  ** representation of the database will usually only exist if there has
10866
10937
  ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
@@ -10931,7 +11002,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
10931
11002
  ** database is currently in a read transaction or is involved in a backup
10932
11003
  ** operation.
10933
11004
  **
10934
- ** It is not possible to deserialized into the TEMP database. If the
11005
+ ** It is not possible to deserialize into the TEMP database. If the
10935
11006
  ** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
10936
11007
  ** function returns SQLITE_ERROR.
10937
11008
  **
@@ -10953,7 +11024,7 @@ SQLITE_API int sqlite3_deserialize(
10953
11024
  sqlite3 *db, /* The database connection */
10954
11025
  const char *zSchema, /* Which DB to reopen with the deserialization */
10955
11026
  unsigned char *pData, /* The serialized database content */
10956
- sqlite3_int64 szDb, /* Number bytes in the deserialization */
11027
+ sqlite3_int64 szDb, /* Number of bytes in the deserialization */
10957
11028
  sqlite3_int64 szBuf, /* Total size of buffer pData[] */
10958
11029
  unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
10959
11030
  );
@@ -10961,7 +11032,7 @@ SQLITE_API int sqlite3_deserialize(
10961
11032
  /*
10962
11033
  ** CAPI3REF: Flags for sqlite3_deserialize()
10963
11034
  **
10964
- ** The following are allowed values for 6th argument (the F argument) to
11035
+ ** The following are allowed values for the 6th argument (the F argument) to
10965
11036
  ** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
10966
11037
  **
10967
11038
  ** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
@@ -11486,9 +11557,10 @@ SQLITE_API void sqlite3session_table_filter(
11486
11557
  ** is inserted while a session object is enabled, then later deleted while
11487
11558
  ** the same session object is disabled, no INSERT record will appear in the
11488
11559
  ** changeset, even though the delete took place while the session was disabled.
11489
- ** Or, if one field of a row is updated while a session is disabled, and
11490
- ** another field of the same row is updated while the session is enabled, the
11491
- ** resulting changeset will contain an UPDATE change that updates both fields.
11560
+ ** Or, if one field of a row is updated while a session is enabled, and
11561
+ ** then another field of the same row is updated while the session is disabled,
11562
+ ** the resulting changeset will contain an UPDATE change that updates both
11563
+ ** fields.
11492
11564
  */
11493
11565
  SQLITE_API int sqlite3session_changeset(
11494
11566
  sqlite3_session *pSession, /* Session object */
@@ -11560,8 +11632,9 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession
11560
11632
  ** database zFrom the contents of the two compatible tables would be
11561
11633
  ** identical.
11562
11634
  **
11563
- ** It an error if database zFrom does not exist or does not contain the
11564
- ** required compatible table.
11635
+ ** Unless the call to this function is a no-op as described above, it is an
11636
+ ** error if database zFrom does not exist or does not contain the required
11637
+ ** compatible table.
11565
11638
  **
11566
11639
  ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite
11567
11640
  ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
@@ -11696,7 +11769,7 @@ SQLITE_API int sqlite3changeset_start_v2(
11696
11769
  ** The following flags may passed via the 4th parameter to
11697
11770
  ** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
11698
11771
  **
11699
- ** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>
11772
+ ** <dt>SQLITE_CHANGESETSTART_INVERT <dd>
11700
11773
  ** Invert the changeset while iterating through it. This is equivalent to
11701
11774
  ** inverting a changeset using sqlite3changeset_invert() before applying it.
11702
11775
  ** It is an error to specify this flag with a patchset.
@@ -12011,19 +12084,6 @@ SQLITE_API int sqlite3changeset_concat(
12011
12084
  void **ppOut /* OUT: Buffer containing output changeset */
12012
12085
  );
12013
12086
 
12014
-
12015
- /*
12016
- ** CAPI3REF: Upgrade the Schema of a Changeset/Patchset
12017
- */
12018
- SQLITE_API int sqlite3changeset_upgrade(
12019
- sqlite3 *db,
12020
- const char *zDb,
12021
- int nIn, const void *pIn, /* Input changeset */
12022
- int *pnOut, void **ppOut /* OUT: Inverse of input */
12023
- );
12024
-
12025
-
12026
-
12027
12087
  /*
12028
12088
  ** CAPI3REF: Changegroup Handle
12029
12089
  **