Fossil SCM
Update the built-in SQLite to the latest trunk version.
Commit
746a9636ab563d942fdc2a6204232e8e0f37ad6d9929172960482e63405fc41f
Parent
e3c6e011be2c84e…
3 files changed
+6
-5
+77
-45
+39
-39
+6
-5
| --- extsrc/shell.c | ||
| +++ extsrc/shell.c | ||
| @@ -29456,11 +29456,12 @@ | ||
| 29456 | 29456 | rc = sqlite3_exec(p->db, |
| 29457 | 29457 | "SELECT sql FROM" |
| 29458 | 29458 | " (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x" |
| 29459 | 29459 | " FROM sqlite_schema UNION ALL" |
| 29460 | 29460 | " SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_schema) " |
| 29461 | - "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%' " | |
| 29461 | + "WHERE type!='meta' AND sql NOTNULL" | |
| 29462 | + " AND name NOT LIKE 'sqlite__%' ESCAPE '_' " | |
| 29462 | 29463 | "ORDER BY x", |
| 29463 | 29464 | callback, &data, 0 |
| 29464 | 29465 | ); |
| 29465 | 29466 | if( rc==SQLITE_OK ){ |
| 29466 | 29467 | sqlite3_stmt *pStmt; |
| @@ -30932,11 +30933,11 @@ | ||
| 30932 | 30933 | } |
| 30933 | 30934 | appendText(&sSelect, " AND ", 0); |
| 30934 | 30935 | sqlite3_free(zQarg); |
| 30935 | 30936 | } |
| 30936 | 30937 | if( bNoSystemTabs ){ |
| 30937 | - appendText(&sSelect, "name NOT LIKE 'sqlite_%%' AND ", 0); | |
| 30938 | + appendText(&sSelect, "name NOT LIKE 'sqlite__%%' ESCALE '_' AND ", 0); | |
| 30938 | 30939 | } |
| 30939 | 30940 | appendText(&sSelect, "sql IS NOT NULL" |
| 30940 | 30941 | " ORDER BY snum, rowid", 0); |
| 30941 | 30942 | if( bDebug ){ |
| 30942 | 30943 | sqlite3_fprintf(p->out, "SQL: %s;\n", sSelect.z); |
| @@ -31363,11 +31364,11 @@ | ||
| 31363 | 31364 | " UNION ALL SELECT 'sqlite_schema'" |
| 31364 | 31365 | " ORDER BY 1 collate nocase"; |
| 31365 | 31366 | }else{ |
| 31366 | 31367 | zSql = "SELECT lower(name) as tname FROM sqlite_schema" |
| 31367 | 31368 | " WHERE type='table' AND coalesce(rootpage,0)>1" |
| 31368 | - " AND name NOT LIKE 'sqlite_%'" | |
| 31369 | + " AND name NOT LIKE 'sqlite__%' ESCAPE '_'" | |
| 31369 | 31370 | " ORDER BY 1 collate nocase"; |
| 31370 | 31371 | } |
| 31371 | 31372 | sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); |
| 31372 | 31373 | initText(&sQuery); |
| 31373 | 31374 | initText(&sSql); |
| @@ -31428,11 +31429,11 @@ | ||
| 31428 | 31429 | { |
| 31429 | 31430 | int lrc; |
| 31430 | 31431 | char *zRevText = /* Query for reversible to-blob-to-text check */ |
| 31431 | 31432 | "SELECT lower(name) as tname FROM sqlite_schema\n" |
| 31432 | 31433 | "WHERE type='table' AND coalesce(rootpage,0)>1\n" |
| 31433 | - "AND name NOT LIKE 'sqlite_%%'%s\n" | |
| 31434 | + "AND name NOT LIKE 'sqlite__%%' ESCAPE '_'%s\n" | |
| 31434 | 31435 | "ORDER BY 1 collate nocase"; |
| 31435 | 31436 | zRevText = sqlite3_mprintf(zRevText, zLike? " AND name LIKE $tspec" : ""); |
| 31436 | 31437 | zRevText = sqlite3_mprintf( |
| 31437 | 31438 | /* lower-case query is first run, producing upper-case query. */ |
| 31438 | 31439 | "with tabcols as materialized(\n" |
| @@ -31624,11 +31625,11 @@ | ||
| 31624 | 31625 | } |
| 31625 | 31626 | appendText(&s, zDbName, '"'); |
| 31626 | 31627 | appendText(&s, ".sqlite_schema ", 0); |
| 31627 | 31628 | if( c=='t' ){ |
| 31628 | 31629 | appendText(&s," WHERE type IN ('table','view')" |
| 31629 | - " AND name NOT LIKE 'sqlite_%'" | |
| 31630 | + " AND name NOT LIKE 'sqlite__%' ESCAPE '_'" | |
| 31630 | 31631 | " AND name LIKE ?1", 0); |
| 31631 | 31632 | }else{ |
| 31632 | 31633 | appendText(&s," WHERE type='index'" |
| 31633 | 31634 | " AND tbl_name LIKE ?1", 0); |
| 31634 | 31635 | } |
| 31635 | 31636 |
| --- extsrc/shell.c | |
| +++ extsrc/shell.c | |
| @@ -29456,11 +29456,12 @@ | |
| 29456 | rc = sqlite3_exec(p->db, |
| 29457 | "SELECT sql FROM" |
| 29458 | " (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x" |
| 29459 | " FROM sqlite_schema UNION ALL" |
| 29460 | " SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_schema) " |
| 29461 | "WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%' " |
| 29462 | "ORDER BY x", |
| 29463 | callback, &data, 0 |
| 29464 | ); |
| 29465 | if( rc==SQLITE_OK ){ |
| 29466 | sqlite3_stmt *pStmt; |
| @@ -30932,11 +30933,11 @@ | |
| 30932 | } |
| 30933 | appendText(&sSelect, " AND ", 0); |
| 30934 | sqlite3_free(zQarg); |
| 30935 | } |
| 30936 | if( bNoSystemTabs ){ |
| 30937 | appendText(&sSelect, "name NOT LIKE 'sqlite_%%' AND ", 0); |
| 30938 | } |
| 30939 | appendText(&sSelect, "sql IS NOT NULL" |
| 30940 | " ORDER BY snum, rowid", 0); |
| 30941 | if( bDebug ){ |
| 30942 | sqlite3_fprintf(p->out, "SQL: %s;\n", sSelect.z); |
| @@ -31363,11 +31364,11 @@ | |
| 31363 | " UNION ALL SELECT 'sqlite_schema'" |
| 31364 | " ORDER BY 1 collate nocase"; |
| 31365 | }else{ |
| 31366 | zSql = "SELECT lower(name) as tname FROM sqlite_schema" |
| 31367 | " WHERE type='table' AND coalesce(rootpage,0)>1" |
| 31368 | " AND name NOT LIKE 'sqlite_%'" |
| 31369 | " ORDER BY 1 collate nocase"; |
| 31370 | } |
| 31371 | sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); |
| 31372 | initText(&sQuery); |
| 31373 | initText(&sSql); |
| @@ -31428,11 +31429,11 @@ | |
| 31428 | { |
| 31429 | int lrc; |
| 31430 | char *zRevText = /* Query for reversible to-blob-to-text check */ |
| 31431 | "SELECT lower(name) as tname FROM sqlite_schema\n" |
| 31432 | "WHERE type='table' AND coalesce(rootpage,0)>1\n" |
| 31433 | "AND name NOT LIKE 'sqlite_%%'%s\n" |
| 31434 | "ORDER BY 1 collate nocase"; |
| 31435 | zRevText = sqlite3_mprintf(zRevText, zLike? " AND name LIKE $tspec" : ""); |
| 31436 | zRevText = sqlite3_mprintf( |
| 31437 | /* lower-case query is first run, producing upper-case query. */ |
| 31438 | "with tabcols as materialized(\n" |
| @@ -31624,11 +31625,11 @@ | |
| 31624 | } |
| 31625 | appendText(&s, zDbName, '"'); |
| 31626 | appendText(&s, ".sqlite_schema ", 0); |
| 31627 | if( c=='t' ){ |
| 31628 | appendText(&s," WHERE type IN ('table','view')" |
| 31629 | " AND name NOT LIKE 'sqlite_%'" |
| 31630 | " AND name LIKE ?1", 0); |
| 31631 | }else{ |
| 31632 | appendText(&s," WHERE type='index'" |
| 31633 | " AND tbl_name LIKE ?1", 0); |
| 31634 | } |
| 31635 |
| --- extsrc/shell.c | |
| +++ extsrc/shell.c | |
| @@ -29456,11 +29456,12 @@ | |
| 29456 | rc = sqlite3_exec(p->db, |
| 29457 | "SELECT sql FROM" |
| 29458 | " (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x" |
| 29459 | " FROM sqlite_schema UNION ALL" |
| 29460 | " SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_schema) " |
| 29461 | "WHERE type!='meta' AND sql NOTNULL" |
| 29462 | " AND name NOT LIKE 'sqlite__%' ESCAPE '_' " |
| 29463 | "ORDER BY x", |
| 29464 | callback, &data, 0 |
| 29465 | ); |
| 29466 | if( rc==SQLITE_OK ){ |
| 29467 | sqlite3_stmt *pStmt; |
| @@ -30932,11 +30933,11 @@ | |
| 30933 | } |
| 30934 | appendText(&sSelect, " AND ", 0); |
| 30935 | sqlite3_free(zQarg); |
| 30936 | } |
| 30937 | if( bNoSystemTabs ){ |
| 30938 | appendText(&sSelect, "name NOT LIKE 'sqlite__%%' ESCALE '_' AND ", 0); |
| 30939 | } |
| 30940 | appendText(&sSelect, "sql IS NOT NULL" |
| 30941 | " ORDER BY snum, rowid", 0); |
| 30942 | if( bDebug ){ |
| 30943 | sqlite3_fprintf(p->out, "SQL: %s;\n", sSelect.z); |
| @@ -31363,11 +31364,11 @@ | |
| 31364 | " UNION ALL SELECT 'sqlite_schema'" |
| 31365 | " ORDER BY 1 collate nocase"; |
| 31366 | }else{ |
| 31367 | zSql = "SELECT lower(name) as tname FROM sqlite_schema" |
| 31368 | " WHERE type='table' AND coalesce(rootpage,0)>1" |
| 31369 | " AND name NOT LIKE 'sqlite__%' ESCAPE '_'" |
| 31370 | " ORDER BY 1 collate nocase"; |
| 31371 | } |
| 31372 | sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); |
| 31373 | initText(&sQuery); |
| 31374 | initText(&sSql); |
| @@ -31428,11 +31429,11 @@ | |
| 31429 | { |
| 31430 | int lrc; |
| 31431 | char *zRevText = /* Query for reversible to-blob-to-text check */ |
| 31432 | "SELECT lower(name) as tname FROM sqlite_schema\n" |
| 31433 | "WHERE type='table' AND coalesce(rootpage,0)>1\n" |
| 31434 | "AND name NOT LIKE 'sqlite__%%' ESCAPE '_'%s\n" |
| 31435 | "ORDER BY 1 collate nocase"; |
| 31436 | zRevText = sqlite3_mprintf(zRevText, zLike? " AND name LIKE $tspec" : ""); |
| 31437 | zRevText = sqlite3_mprintf( |
| 31438 | /* lower-case query is first run, producing upper-case query. */ |
| 31439 | "with tabcols as materialized(\n" |
| @@ -31624,11 +31625,11 @@ | |
| 31625 | } |
| 31626 | appendText(&s, zDbName, '"'); |
| 31627 | appendText(&s, ".sqlite_schema ", 0); |
| 31628 | if( c=='t' ){ |
| 31629 | appendText(&s," WHERE type IN ('table','view')" |
| 31630 | " AND name NOT LIKE 'sqlite__%' ESCAPE '_'" |
| 31631 | " AND name LIKE ?1", 0); |
| 31632 | }else{ |
| 31633 | appendText(&s," WHERE type='index'" |
| 31634 | " AND tbl_name LIKE ?1", 0); |
| 31635 | } |
| 31636 |
+77
-45
| --- extsrc/sqlite3.c | ||
| +++ extsrc/sqlite3.c | ||
| @@ -16,11 +16,11 @@ | ||
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | 19 | ** |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | -** a88bb75288a06492a04ab1278e8a2101a74f with changes in files: | |
| 21 | +** cf61cd359e666c66b6bba4407a653c799f7f with changes in files: | |
| 22 | 22 | ** |
| 23 | 23 | ** |
| 24 | 24 | */ |
| 25 | 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | ||
| 465 | 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | 467 | */ |
| 468 | 468 | #define SQLITE_VERSION "3.51.0" |
| 469 | 469 | #define SQLITE_VERSION_NUMBER 3051000 |
| 470 | -#define SQLITE_SOURCE_ID "2025-06-19 20:19:12 a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d" | |
| 470 | +#define SQLITE_SOURCE_ID "2025-06-23 16:51:33 cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a" | |
| 471 | 471 | |
| 472 | 472 | /* |
| 473 | 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | 475 | ** |
| @@ -485,13 +485,13 @@ | ||
| 485 | 485 | ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); |
| 486 | 486 | ** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); |
| 487 | 487 | ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
| 488 | 488 | ** </pre></blockquote>)^ |
| 489 | 489 | ** |
| 490 | -** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] | |
| 491 | -** macro. ^The sqlite3_libversion() function returns a pointer to the | |
| 492 | -** to the sqlite3_version[] string constant. The sqlite3_libversion() | |
| 490 | +** ^The sqlite3_version[] string constant contains the text of the | |
| 491 | +** [SQLITE_VERSION] macro. ^The sqlite3_libversion() function returns a | |
| 492 | +** pointer to the sqlite3_version[] string constant. The sqlite3_libversion() | |
| 493 | 493 | ** function is provided for use in DLLs since DLL users usually do not have |
| 494 | 494 | ** direct access to string constants within the DLL. ^The |
| 495 | 495 | ** sqlite3_libversion_number() function returns an integer equal to |
| 496 | 496 | ** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns |
| 497 | 497 | ** a pointer to a string constant whose value is the same as the |
| @@ -687,11 +687,11 @@ | ||
| 687 | 687 | ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], |
| 688 | 688 | ** that allows an application to run multiple statements of SQL |
| 689 | 689 | ** without having to use a lot of C code. |
| 690 | 690 | ** |
| 691 | 691 | ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, |
| 692 | -** semicolon-separate SQL statements passed into its 2nd argument, | |
| 692 | +** semicolon-separated SQL statements passed into its 2nd argument, | |
| 693 | 693 | ** in the context of the [database connection] passed in as its 1st |
| 694 | 694 | ** argument. ^If the callback function of the 3rd argument to |
| 695 | 695 | ** sqlite3_exec() is not NULL, then it is invoked for each result row |
| 696 | 696 | ** coming out of the evaluated SQL statements. ^The 4th argument to |
| 697 | 697 | ** sqlite3_exec() is relayed through to the 1st argument of each |
| @@ -720,11 +720,11 @@ | ||
| 720 | 720 | ** callback is an array of pointers to strings obtained as if from |
| 721 | 721 | ** [sqlite3_column_text()], one for each column. ^If an element of a |
| 722 | 722 | ** result row is NULL then the corresponding string pointer for the |
| 723 | 723 | ** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the |
| 724 | 724 | ** sqlite3_exec() callback is an array of pointers to strings where each |
| 725 | -** entry represents the name of corresponding result column as obtained | |
| 725 | +** entry represents the name of a corresponding result column as obtained | |
| 726 | 726 | ** from [sqlite3_column_name()]. |
| 727 | 727 | ** |
| 728 | 728 | ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer |
| 729 | 729 | ** to an empty string, or a pointer that contains only whitespace and/or |
| 730 | 730 | ** SQL comments, then no SQL statements are evaluated and the database |
| @@ -906,11 +906,11 @@ | ||
| 906 | 906 | ** Applications should not depend on the historical behavior. |
| 907 | 907 | ** |
| 908 | 908 | ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
| 909 | 909 | ** [sqlite3_open_v2()] does *not* cause the underlying database file |
| 910 | 910 | ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
| 911 | -** [sqlite3_open_v2()] has historically be a no-op and might become an | |
| 911 | +** [sqlite3_open_v2()] has historically been a no-op and might become an | |
| 912 | 912 | ** error in future versions of SQLite. |
| 913 | 913 | */ |
| 914 | 914 | #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
| 915 | 915 | #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
| 916 | 916 | #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ |
| @@ -1000,11 +1000,11 @@ | ||
| 1000 | 1000 | ** CAPI3REF: File Locking Levels |
| 1001 | 1001 | ** |
| 1002 | 1002 | ** SQLite uses one of these integer values as the second |
| 1003 | 1003 | ** argument to calls it makes to the xLock() and xUnlock() methods |
| 1004 | 1004 | ** of an [sqlite3_io_methods] object. These values are ordered from |
| 1005 | -** lest restrictive to most restrictive. | |
| 1005 | +** least restrictive to most restrictive. | |
| 1006 | 1006 | ** |
| 1007 | 1007 | ** The argument to xLock() is always SHARED or higher. The argument to |
| 1008 | 1008 | ** xUnlock is either SHARED or NONE. |
| 1009 | 1009 | */ |
| 1010 | 1010 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
| @@ -1316,11 +1316,11 @@ | ||
| 1316 | 1316 | ** reason, the entire database file will be overwritten by the current |
| 1317 | 1317 | ** transaction. This is used by VACUUM operations. |
| 1318 | 1318 | ** |
| 1319 | 1319 | ** <li>[[SQLITE_FCNTL_VFSNAME]] |
| 1320 | 1320 | ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
| 1321 | -** all [VFSes] in the VFS stack. The names are of all VFS shims and the | |
| 1321 | +** all [VFSes] in the VFS stack. The names of all VFS shims and the | |
| 1322 | 1322 | ** final bottom-level VFS are written into memory obtained from |
| 1323 | 1323 | ** [sqlite3_malloc()] and the result is stored in the char* variable |
| 1324 | 1324 | ** that the fourth parameter of [sqlite3_file_control()] points to. |
| 1325 | 1325 | ** The caller is responsible for freeing the memory when done. As with |
| 1326 | 1326 | ** all file-control actions, there is no guarantee that this will actually |
| @@ -1330,11 +1330,11 @@ | ||
| 1330 | 1330 | ** |
| 1331 | 1331 | ** <li>[[SQLITE_FCNTL_VFS_POINTER]] |
| 1332 | 1332 | ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level |
| 1333 | 1333 | ** [VFSes] currently in use. ^(The argument X in |
| 1334 | 1334 | ** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be |
| 1335 | -** of type "[sqlite3_vfs] **". This opcodes will set *X | |
| 1335 | +** of type "[sqlite3_vfs] **". This opcode will set *X | |
| 1336 | 1336 | ** to a pointer to the top-level VFS.)^ |
| 1337 | 1337 | ** ^When there are multiple VFS shims in the stack, this opcode finds the |
| 1338 | 1338 | ** upper-most shim only. |
| 1339 | 1339 | ** |
| 1340 | 1340 | ** <li>[[SQLITE_FCNTL_PRAGMA]] |
| @@ -1520,11 +1520,11 @@ | ||
| 1520 | 1520 | ** record the fact that the pages have been checkpointed. |
| 1521 | 1521 | ** |
| 1522 | 1522 | ** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
| 1523 | 1523 | ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
| 1524 | 1524 | ** whether or not there is a database client in another process with a wal-mode |
| 1525 | -** transaction open on the database or not. It is only available on unix.The | |
| 1525 | +** transaction open on the database or not. It is only available on unix. The | |
| 1526 | 1526 | ** (void*) argument passed with this file-control should be a pointer to a |
| 1527 | 1527 | ** value of type (int). The integer value is set to 1 if the database is a wal |
| 1528 | 1528 | ** mode database and there exists at least one client in another process that |
| 1529 | 1529 | ** currently has an SQL transaction open on the database. It is set to 0 if |
| 1530 | 1530 | ** the database is not a wal-mode db, or if there is no such connection in any |
| @@ -1945,11 +1945,11 @@ | ||
| 1945 | 1945 | ** |
| 1946 | 1946 | ** ^The sqlite3_initialize() routine is called internally by many other |
| 1947 | 1947 | ** SQLite interfaces so that an application usually does not need to |
| 1948 | 1948 | ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] |
| 1949 | 1949 | ** calls sqlite3_initialize() so the SQLite library will be automatically |
| 1950 | -** initialized when [sqlite3_open()] is called if it has not be initialized | |
| 1950 | +** initialized when [sqlite3_open()] is called if it has not been initialized | |
| 1951 | 1951 | ** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] |
| 1952 | 1952 | ** compile-time option, then the automatic calls to sqlite3_initialize() |
| 1953 | 1953 | ** are omitted and the application must call sqlite3_initialize() directly |
| 1954 | 1954 | ** prior to using any other SQLite interface. For maximum portability, |
| 1955 | 1955 | ** it is recommended that applications always invoke sqlite3_initialize() |
| @@ -2202,25 +2202,25 @@ | ||
| 2202 | 2202 | ** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which |
| 2203 | 2203 | ** is a pointer to an instance of the [sqlite3_mem_methods] structure. |
| 2204 | 2204 | ** The [sqlite3_mem_methods] |
| 2205 | 2205 | ** structure is filled with the currently defined memory allocation routines.)^ |
| 2206 | 2206 | ** This option can be used to overload the default memory allocation |
| 2207 | -** routines with a wrapper that simulations memory allocation failure or | |
| 2207 | +** routines with a wrapper that simulates memory allocation failure or | |
| 2208 | 2208 | ** tracks memory usage, for example. </dd> |
| 2209 | 2209 | ** |
| 2210 | 2210 | ** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt> |
| 2211 | -** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes single argument of | |
| 2211 | +** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of | |
| 2212 | 2212 | ** type int, interpreted as a boolean, which if true provides a hint to |
| 2213 | 2213 | ** SQLite that it should avoid large memory allocations if possible. |
| 2214 | 2214 | ** SQLite will run faster if it is free to make large memory allocations, |
| 2215 | -** but some application might prefer to run slower in exchange for | |
| 2215 | +** but some applications might prefer to run slower in exchange for | |
| 2216 | 2216 | ** guarantees about memory fragmentation that are possible if large |
| 2217 | 2217 | ** allocations are avoided. This hint is normally off. |
| 2218 | 2218 | ** </dd> |
| 2219 | 2219 | ** |
| 2220 | 2220 | ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> |
| 2221 | -** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int, | |
| 2221 | +** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type int, | |
| 2222 | 2222 | ** interpreted as a boolean, which enables or disables the collection of |
| 2223 | 2223 | ** memory allocation statistics. ^(When memory allocation statistics are |
| 2224 | 2224 | ** disabled, the following SQLite interfaces become non-operational: |
| 2225 | 2225 | ** <ul> |
| 2226 | 2226 | ** <li> [sqlite3_hard_heap_limit64()] |
| @@ -2261,11 +2261,11 @@ | ||
| 2261 | 2261 | ** a page cache line is larger than sz bytes or if all of the pMem buffer |
| 2262 | 2262 | ** is exhausted. |
| 2263 | 2263 | ** ^If pMem is NULL and N is non-zero, then each database connection |
| 2264 | 2264 | ** does an initial bulk allocation for page cache memory |
| 2265 | 2265 | ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or |
| 2266 | -** of -1024*N bytes if N is negative, . ^If additional | |
| 2266 | +** of -1024*N bytes if N is negative. ^If additional | |
| 2267 | 2267 | ** page cache memory is needed beyond what is provided by the initial |
| 2268 | 2268 | ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each |
| 2269 | 2269 | ** additional cache line. </dd> |
| 2270 | 2270 | ** |
| 2271 | 2271 | ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> |
| @@ -2290,11 +2290,11 @@ | ||
| 2290 | 2290 | ** |
| 2291 | 2291 | ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> |
| 2292 | 2292 | ** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a |
| 2293 | 2293 | ** pointer to an instance of the [sqlite3_mutex_methods] structure. |
| 2294 | 2294 | ** The argument specifies alternative low-level mutex routines to be used |
| 2295 | -** in place the mutex routines built into SQLite.)^ ^SQLite makes a copy of | |
| 2295 | +** in place of the mutex routines built into SQLite.)^ ^SQLite makes a copy of | |
| 2296 | 2296 | ** the content of the [sqlite3_mutex_methods] structure before the call to |
| 2297 | 2297 | ** [sqlite3_config()] returns. ^If SQLite is compiled with |
| 2298 | 2298 | ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then |
| 2299 | 2299 | ** the entire mutexing subsystem is omitted from the build and hence calls to |
| 2300 | 2300 | ** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will |
| @@ -2332,11 +2332,11 @@ | ||
| 2332 | 2332 | ** the interface to a custom page cache implementation.)^ |
| 2333 | 2333 | ** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> |
| 2334 | 2334 | ** |
| 2335 | 2335 | ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> |
| 2336 | 2336 | ** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which |
| 2337 | -** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies of | |
| 2337 | +** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies off | |
| 2338 | 2338 | ** the current page cache implementation into that object.)^ </dd> |
| 2339 | 2339 | ** |
| 2340 | 2340 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 2341 | 2341 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 2342 | 2342 | ** global [error log]. |
| @@ -2349,11 +2349,11 @@ | ||
| 2349 | 2349 | ** passed through as the first parameter to the application-defined logger |
| 2350 | 2350 | ** function whenever that function is invoked. ^The second parameter to |
| 2351 | 2351 | ** the logger function is a copy of the first parameter to the corresponding |
| 2352 | 2352 | ** [sqlite3_log()] call and is intended to be a [result code] or an |
| 2353 | 2353 | ** [extended result code]. ^The third parameter passed to the logger is |
| 2354 | -** log message after formatting via [sqlite3_snprintf()]. | |
| 2354 | +** a log message after formatting via [sqlite3_snprintf()]. | |
| 2355 | 2355 | ** The SQLite logging interface is not reentrant; the logger function |
| 2356 | 2356 | ** supplied by the application must not invoke any SQLite interface. |
| 2357 | 2357 | ** In a multi-threaded application, the application-defined logger |
| 2358 | 2358 | ** function must be threadsafe. </dd> |
| 2359 | 2359 | ** |
| @@ -2540,11 +2540,11 @@ | ||
| 2540 | 2540 | ** CAPI3REF: Database Connection Configuration Options |
| 2541 | 2541 | ** |
| 2542 | 2542 | ** These constants are the available integer configuration options that |
| 2543 | 2543 | ** can be passed as the second parameter to the [sqlite3_db_config()] interface. |
| 2544 | 2544 | ** |
| 2545 | -** The [sqlite3_db_config()] interface is a var-args functions. It takes a | |
| 2545 | +** The [sqlite3_db_config()] interface is a var-args function. It takes a | |
| 2546 | 2546 | ** variable number of parameters, though always at least two. The number of |
| 2547 | 2547 | ** parameters passed into sqlite3_db_config() depends on which of these |
| 2548 | 2548 | ** constants is given as the second parameter. This documentation page |
| 2549 | 2549 | ** refers to parameters beyond the second as "arguments". Thus, when this |
| 2550 | 2550 | ** page says "the N-th argument" it means "the N-th parameter past the |
| @@ -2674,12 +2674,12 @@ | ||
| 2674 | 2674 | ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 2675 | 2675 | ** There must be two additional arguments. |
| 2676 | 2676 | ** When the first argument to this interface is 1, then only the C-API is |
| 2677 | 2677 | ** enabled and the SQL function remains disabled. If the first argument to |
| 2678 | 2678 | ** this interface is 0, then both the C-API and the SQL function are disabled. |
| 2679 | -** If the first argument is -1, then no changes are made to state of either the | |
| 2680 | -** C-API or the SQL function. | |
| 2679 | +** If the first argument is -1, then no changes are made to the state of either | |
| 2680 | +** the C-API or the SQL function. | |
| 2681 | 2681 | ** The second parameter is a pointer to an integer into which |
| 2682 | 2682 | ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface |
| 2683 | 2683 | ** is disabled or enabled following this call. The second parameter may |
| 2684 | 2684 | ** be a NULL pointer, in which case the new setting is not reported back. |
| 2685 | 2685 | ** </dd> |
| @@ -2793,11 +2793,11 @@ | ||
| 2793 | 2793 | ** </dd> |
| 2794 | 2794 | ** |
| 2795 | 2795 | ** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]] |
| 2796 | 2796 | ** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt> |
| 2797 | 2797 | ** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates |
| 2798 | -** the legacy behavior of the [ALTER TABLE RENAME] command such it | |
| 2798 | +** the legacy behavior of the [ALTER TABLE RENAME] command such that it | |
| 2799 | 2799 | ** behaves as it did prior to [version 3.24.0] (2018-06-04). See the |
| 2800 | 2800 | ** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for |
| 2801 | 2801 | ** additional information. This feature can also be turned on and off |
| 2802 | 2802 | ** using the [PRAGMA legacy_alter_table] statement. |
| 2803 | 2803 | ** </dd> |
| @@ -2842,11 +2842,11 @@ | ||
| 2842 | 2842 | ** |
| 2843 | 2843 | ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
| 2844 | 2844 | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
| 2845 | 2845 | ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
| 2846 | 2846 | ** the legacy file format flag. When activated, this flag causes all newly |
| 2847 | -** created database file to have a schema format version number (the 4-byte | |
| 2847 | +** created database files to have a schema format version number (the 4-byte | |
| 2848 | 2848 | ** integer found at offset 44 into the database header) of 1. This in turn |
| 2849 | 2849 | ** means that the resulting database file will be readable and writable by |
| 2850 | 2850 | ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
| 2851 | 2851 | ** newly created databases are generally not understandable by SQLite versions |
| 2852 | 2852 | ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
| @@ -2869,11 +2869,11 @@ | ||
| 2869 | 2869 | ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
| 2870 | 2870 | ** statistics. For statistics to be collected, the flag must be set on |
| 2871 | 2871 | ** the database handle both when the SQL statement is prepared and when it |
| 2872 | 2872 | ** is stepped. The flag is set (collection of statistics is enabled) |
| 2873 | 2873 | ** by default. <p>This option takes two arguments: an integer and a pointer to |
| 2874 | -** an integer.. The first argument is 1, 0, or -1 to enable, disable, or | |
| 2874 | +** an integer. The first argument is 1, 0, or -1 to enable, disable, or | |
| 2875 | 2875 | ** leave unchanged the statement scanstatus option. If the second argument |
| 2876 | 2876 | ** is not NULL, then the value of the statement scanstatus setting after |
| 2877 | 2877 | ** processing the first argument is written into the integer that the second |
| 2878 | 2878 | ** argument points to. |
| 2879 | 2879 | ** </dd> |
| @@ -2912,12 +2912,12 @@ | ||
| 2912 | 2912 | ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]] |
| 2913 | 2913 | ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt> |
| 2914 | 2914 | ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the |
| 2915 | 2915 | ** ability of the [ATTACH DATABASE] SQL command to open a database for writing. |
| 2916 | 2916 | ** This capability is enabled by default. Applications can disable or |
| 2917 | -** reenable this capability using the current DBCONFIG option. If the | |
| 2918 | -** the this capability is disabled, the [ATTACH] command will still work, | |
| 2917 | +** reenable this capability using the current DBCONFIG option. If | |
| 2918 | +** this capability is disabled, the [ATTACH] command will still work, | |
| 2919 | 2919 | ** but the database will be opened read-only. If this option is disabled, |
| 2920 | 2920 | ** then the ability to create a new database using [ATTACH] is also disabled, |
| 2921 | 2921 | ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE] |
| 2922 | 2922 | ** option.<p> |
| 2923 | 2923 | ** This option takes two arguments which are an integer and a pointer |
| @@ -2947,11 +2947,11 @@ | ||
| 2947 | 2947 | ** |
| 2948 | 2948 | ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3> |
| 2949 | 2949 | ** |
| 2950 | 2950 | ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the |
| 2951 | 2951 | ** overall call to [sqlite3_db_config()] has a total of four parameters. |
| 2952 | -** The first argument (the third parameter to sqlite3_db_config()) is a integer. | |
| 2952 | +** The first argument (the third parameter to sqlite3_db_config()) is an integer. | |
| 2953 | 2953 | ** The second argument is a pointer to an integer. If the first argument is 1, |
| 2954 | 2954 | ** then the option becomes enabled. If the first integer argument is 0, then the |
| 2955 | 2955 | ** option is disabled. If the first argument is -1, then the option setting |
| 2956 | 2956 | ** is unchanged. The second argument, the pointer to an integer, may be NULL. |
| 2957 | 2957 | ** If the second argument is not NULL, then a value of 0 or 1 is written into |
| @@ -3237,11 +3237,11 @@ | ||
| 3237 | 3237 | ** and comments that follow the final semicolon are ignored. |
| 3238 | 3238 | ** |
| 3239 | 3239 | ** ^These routines return 0 if the statement is incomplete. ^If a |
| 3240 | 3240 | ** memory allocation fails, then SQLITE_NOMEM is returned. |
| 3241 | 3241 | ** |
| 3242 | -** ^These routines do not parse the SQL statements thus | |
| 3242 | +** ^These routines do not parse the SQL statements and thus | |
| 3243 | 3243 | ** will not detect syntactically incorrect SQL. |
| 3244 | 3244 | ** |
| 3245 | 3245 | ** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior |
| 3246 | 3246 | ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked |
| 3247 | 3247 | ** automatically by sqlite3_complete16(). If that initialization fails, |
| @@ -3354,11 +3354,11 @@ | ||
| 3354 | 3354 | ** Passing 0 to this function disables blocking locks altogether. Passing |
| 3355 | 3355 | ** -1 to this function requests that the VFS blocks for a long time - |
| 3356 | 3356 | ** indefinitely if possible. The results of passing any other negative value |
| 3357 | 3357 | ** are undefined. |
| 3358 | 3358 | ** |
| 3359 | -** Internally, each SQLite database handle store two timeout values - the | |
| 3359 | +** Internally, each SQLite database handle stores two timeout values - the | |
| 3360 | 3360 | ** busy-timeout (used for rollback mode databases, or if the VFS does not |
| 3361 | 3361 | ** support blocking locks) and the setlk-timeout (used for blocking locks |
| 3362 | 3362 | ** on wal-mode databases). The sqlite3_busy_timeout() method sets both |
| 3363 | 3363 | ** values, this function sets only the setlk-timeout value. Therefore, |
| 3364 | 3364 | ** to configure separate busy-timeout and setlk-timeout values for a single |
| @@ -3384,11 +3384,11 @@ | ||
| 3384 | 3384 | ** METHOD: sqlite3 |
| 3385 | 3385 | ** |
| 3386 | 3386 | ** This is a legacy interface that is preserved for backwards compatibility. |
| 3387 | 3387 | ** Use of this interface is not recommended. |
| 3388 | 3388 | ** |
| 3389 | -** Definition: A <b>result table</b> is memory data structure created by the | |
| 3389 | +** Definition: A <b>result table</b> is a memory data structure created by the | |
| 3390 | 3390 | ** [sqlite3_get_table()] interface. A result table records the |
| 3391 | 3391 | ** complete query results from one or more queries. |
| 3392 | 3392 | ** |
| 3393 | 3393 | ** The table conceptually has a number of rows and columns. But |
| 3394 | 3394 | ** these numbers are not part of the result table itself. These |
| @@ -3527,11 +3527,11 @@ | ||
| 3527 | 3527 | ** of a signed 32-bit integer. |
| 3528 | 3528 | ** |
| 3529 | 3529 | ** ^Calling sqlite3_free() with a pointer previously returned |
| 3530 | 3530 | ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so |
| 3531 | 3531 | ** that it might be reused. ^The sqlite3_free() routine is |
| 3532 | -** a no-op if is called with a NULL pointer. Passing a NULL pointer | |
| 3532 | +** a no-op if it is called with a NULL pointer. Passing a NULL pointer | |
| 3533 | 3533 | ** to sqlite3_free() is harmless. After being freed, memory |
| 3534 | 3534 | ** should neither be read nor written. Even reading previously freed |
| 3535 | 3535 | ** memory might result in a segmentation fault or other severe error. |
| 3536 | 3536 | ** Memory corruption, a segmentation fault, or other severe error |
| 3537 | 3537 | ** might result if sqlite3_free() is called with a non-NULL pointer that |
| @@ -3545,17 +3545,17 @@ | ||
| 3545 | 3545 | ** ^If the N parameter to sqlite3_realloc(X,N) is zero or |
| 3546 | 3546 | ** negative then the behavior is exactly the same as calling |
| 3547 | 3547 | ** sqlite3_free(X). |
| 3548 | 3548 | ** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation |
| 3549 | 3549 | ** of at least N bytes in size or NULL if insufficient memory is available. |
| 3550 | -** ^If M is the size of the prior allocation, then min(N,M) bytes | |
| 3551 | -** of the prior allocation are copied into the beginning of buffer returned | |
| 3550 | +** ^If M is the size of the prior allocation, then min(N,M) bytes of the | |
| 3551 | +** prior allocation are copied into the beginning of the buffer returned | |
| 3552 | 3552 | ** by sqlite3_realloc(X,N) and the prior allocation is freed. |
| 3553 | 3553 | ** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the |
| 3554 | 3554 | ** prior allocation is not freed. |
| 3555 | 3555 | ** |
| 3556 | -** ^The sqlite3_realloc64(X,N) interfaces works the same as | |
| 3556 | +** ^The sqlite3_realloc64(X,N) interface works the same as | |
| 3557 | 3557 | ** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead |
| 3558 | 3558 | ** of a 32-bit signed integer. |
| 3559 | 3559 | ** |
| 3560 | 3560 | ** ^If X is a memory allocation previously obtained from sqlite3_malloc(), |
| 3561 | 3561 | ** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then |
| @@ -3601,11 +3601,11 @@ | ||
| 3601 | 3601 | ** ^The [sqlite3_memory_highwater()] routine returns the maximum |
| 3602 | 3602 | ** value of [sqlite3_memory_used()] since the high-water mark |
| 3603 | 3603 | ** was last reset. ^The values returned by [sqlite3_memory_used()] and |
| 3604 | 3604 | ** [sqlite3_memory_highwater()] include any overhead |
| 3605 | 3605 | ** added by SQLite in its implementation of [sqlite3_malloc()], |
| 3606 | -** but not overhead added by the any underlying system library | |
| 3606 | +** but not overhead added by any underlying system library | |
| 3607 | 3607 | ** routines that [sqlite3_malloc()] may call. |
| 3608 | 3608 | ** |
| 3609 | 3609 | ** ^The memory high-water mark is reset to the current value of |
| 3610 | 3610 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 3611 | 3611 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| @@ -4053,19 +4053,19 @@ | ||
| 4053 | 4053 | ** attempt to use the same database connection at the same time. |
| 4054 | 4054 | ** (Mutexes will block any actual concurrency, but in this mode |
| 4055 | 4055 | ** there is no harm in trying.) |
| 4056 | 4056 | ** |
| 4057 | 4057 | ** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt> |
| 4058 | -** <dd>The database is opened [shared cache] enabled, overriding | |
| 4058 | +** <dd>The database is opened with [shared cache] enabled, overriding | |
| 4059 | 4059 | ** the default shared cache setting provided by |
| 4060 | 4060 | ** [sqlite3_enable_shared_cache()].)^ |
| 4061 | 4061 | ** The [use of shared cache mode is discouraged] and hence shared cache |
| 4062 | 4062 | ** capabilities may be omitted from many builds of SQLite. In such cases, |
| 4063 | 4063 | ** this option is a no-op. |
| 4064 | 4064 | ** |
| 4065 | 4065 | ** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
| 4066 | -** <dd>The database is opened [shared cache] disabled, overriding | |
| 4066 | +** <dd>The database is opened with [shared cache] disabled, overriding | |
| 4067 | 4067 | ** the default shared cache setting provided by |
| 4068 | 4068 | ** [sqlite3_enable_shared_cache()].)^ |
| 4069 | 4069 | ** |
| 4070 | 4070 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 4071 | 4071 | ** <dd>The database connection comes up in "extended result code mode". |
| @@ -74729,10 +74729,14 @@ | ||
| 74729 | 74729 | BtShared *pBt = p->pBt; |
| 74730 | 74730 | assert( nReserve>=0 && nReserve<=255 ); |
| 74731 | 74731 | sqlite3BtreeEnter(p); |
| 74732 | 74732 | pBt->nReserveWanted = (u8)nReserve; |
| 74733 | 74733 | x = pBt->pageSize - pBt->usableSize; |
| 74734 | + if( x==nReserve && (pageSize==0 || (u32)pageSize==pBt->pageSize) ){ | |
| 74735 | + sqlite3BtreeLeave(p); | |
| 74736 | + return SQLITE_OK; | |
| 74737 | + } | |
| 74734 | 74738 | if( nReserve<x ) nReserve = x; |
| 74735 | 74739 | if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){ |
| 74736 | 74740 | sqlite3BtreeLeave(p); |
| 74737 | 74741 | return SQLITE_READONLY; |
| 74738 | 74742 | } |
| @@ -95229,10 +95233,40 @@ | ||
| 95229 | 95233 | } |
| 95230 | 95234 | pDest->flags &= ~MEM_Ephem; |
| 95231 | 95235 | return rc; |
| 95232 | 95236 | } |
| 95233 | 95237 | |
| 95238 | +/* | |
| 95239 | +** Send a "statement aborts" message to the error log. | |
| 95240 | +*/ | |
| 95241 | +static SQLITE_NOINLINE void sqlite3VdbeLogAbort( | |
| 95242 | + Vdbe *p, /* The statement that is running at the time of failure */ | |
| 95243 | + int rc, /* Error code */ | |
| 95244 | + Op *pOp, /* Opcode that filed */ | |
| 95245 | + Op *aOp /* All opcodes */ | |
| 95246 | +){ | |
| 95247 | + const char *zSql = p->zSql; /* Original SQL text */ | |
| 95248 | + const char *zPrefix = ""; /* Prefix added to SQL text */ | |
| 95249 | + int pc; /* Opcode address */ | |
| 95250 | + char zXtra[100]; /* Buffer space to store zPrefix */ | |
| 95251 | + | |
| 95252 | + if( p->pFrame ){ | |
| 95253 | + assert( aOp[0].opcode==OP_Init ); | |
| 95254 | + if( aOp[0].p4.z!=0 ){ | |
| 95255 | + assert( aOp[0].p4.z[0]=='-' | |
| 95256 | + && aOp[0].p4.z[1]=='-' | |
| 95257 | + && aOp[0].p4.z[2]==' ' ); | |
| 95258 | + sqlite3_snprintf(sizeof(zXtra), zXtra,"/* %s */ ",aOp[0].p4.z+3); | |
| 95259 | + zPrefix = zXtra; | |
| 95260 | + }else{ | |
| 95261 | + zPrefix = "/* unknown trigger */ "; | |
| 95262 | + } | |
| 95263 | + } | |
| 95264 | + pc = (int)(pOp - aOp); | |
| 95265 | + sqlite3_log(rc, "statement aborts at %d: %s; [%s%s]", | |
| 95266 | + pc, p->zErrMsg, zPrefix, zSql); | |
| 95267 | +} | |
| 95234 | 95268 | |
| 95235 | 95269 | /* |
| 95236 | 95270 | ** Return the symbolic name for the data type of a pMem |
| 95237 | 95271 | */ |
| 95238 | 95272 | static const char *vdbeMemTypeName(Mem *pMem){ |
| @@ -95754,12 +95788,11 @@ | ||
| 95754 | 95788 | p->zErrMsg = sqlite3MPrintf(db, "%z: %s", p->zErrMsg, pOp->p4.z); |
| 95755 | 95789 | } |
| 95756 | 95790 | }else{ |
| 95757 | 95791 | sqlite3VdbeError(p, "%s", pOp->p4.z); |
| 95758 | 95792 | } |
| 95759 | - pcx = (int)(pOp - aOp); | |
| 95760 | - sqlite3_log(pOp->p1, "abort at %d: %s; [%s]", pcx, p->zErrMsg, p->zSql); | |
| 95793 | + sqlite3VdbeLogAbort(p, pOp->p1, pOp, aOp); | |
| 95761 | 95794 | } |
| 95762 | 95795 | rc = sqlite3VdbeHalt(p); |
| 95763 | 95796 | assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR ); |
| 95764 | 95797 | if( rc==SQLITE_BUSY ){ |
| 95765 | 95798 | p->rc = SQLITE_BUSY; |
| @@ -103619,12 +103652,11 @@ | ||
| 103619 | 103652 | sqlite3VdbeError(p, "%s", sqlite3ErrStr(rc)); |
| 103620 | 103653 | } |
| 103621 | 103654 | p->rc = rc; |
| 103622 | 103655 | sqlite3SystemError(db, rc); |
| 103623 | 103656 | testcase( sqlite3GlobalConfig.xLog!=0 ); |
| 103624 | - sqlite3_log(rc, "statement aborts at %d: %s; [%s]", | |
| 103625 | - (int)(pOp - aOp), p->zErrMsg, p->zSql); | |
| 103657 | + sqlite3VdbeLogAbort(p, rc, pOp, aOp); | |
| 103626 | 103658 | if( p->eVdbeState==VDBE_RUN_STATE ) sqlite3VdbeHalt(p); |
| 103627 | 103659 | if( rc==SQLITE_IOERR_NOMEM ) sqlite3OomFault(db); |
| 103628 | 103660 | if( rc==SQLITE_CORRUPT && db->autoCommit==0 ){ |
| 103629 | 103661 | db->flags |= SQLITE_CorruptRdOnly; |
| 103630 | 103662 | } |
| @@ -257401,11 +257433,11 @@ | ||
| 257401 | 257433 | int nArg, /* Number of args */ |
| 257402 | 257434 | sqlite3_value **apUnused /* Function arguments */ |
| 257403 | 257435 | ){ |
| 257404 | 257436 | assert( nArg==0 ); |
| 257405 | 257437 | UNUSED_PARAM2(nArg, apUnused); |
| 257406 | - sqlite3_result_text(pCtx, "fts5: 2025-06-19 20:19:12 a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d", -1, SQLITE_TRANSIENT); | |
| 257438 | + sqlite3_result_text(pCtx, "fts5: 2025-06-23 16:51:33 cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a", -1, SQLITE_TRANSIENT); | |
| 257407 | 257439 | } |
| 257408 | 257440 | |
| 257409 | 257441 | /* |
| 257410 | 257442 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257411 | 257443 | ** |
| 257412 | 257444 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** a88bb75288a06492a04ab1278e8a2101a74f with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | |
| 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | */ |
| 468 | #define SQLITE_VERSION "3.51.0" |
| 469 | #define SQLITE_VERSION_NUMBER 3051000 |
| 470 | #define SQLITE_SOURCE_ID "2025-06-19 20:19:12 a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -485,13 +485,13 @@ | |
| 485 | ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); |
| 486 | ** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); |
| 487 | ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
| 488 | ** </pre></blockquote>)^ |
| 489 | ** |
| 490 | ** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] |
| 491 | ** macro. ^The sqlite3_libversion() function returns a pointer to the |
| 492 | ** to the sqlite3_version[] string constant. The sqlite3_libversion() |
| 493 | ** function is provided for use in DLLs since DLL users usually do not have |
| 494 | ** direct access to string constants within the DLL. ^The |
| 495 | ** sqlite3_libversion_number() function returns an integer equal to |
| 496 | ** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns |
| 497 | ** a pointer to a string constant whose value is the same as the |
| @@ -687,11 +687,11 @@ | |
| 687 | ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], |
| 688 | ** that allows an application to run multiple statements of SQL |
| 689 | ** without having to use a lot of C code. |
| 690 | ** |
| 691 | ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, |
| 692 | ** semicolon-separate SQL statements passed into its 2nd argument, |
| 693 | ** in the context of the [database connection] passed in as its 1st |
| 694 | ** argument. ^If the callback function of the 3rd argument to |
| 695 | ** sqlite3_exec() is not NULL, then it is invoked for each result row |
| 696 | ** coming out of the evaluated SQL statements. ^The 4th argument to |
| 697 | ** sqlite3_exec() is relayed through to the 1st argument of each |
| @@ -720,11 +720,11 @@ | |
| 720 | ** callback is an array of pointers to strings obtained as if from |
| 721 | ** [sqlite3_column_text()], one for each column. ^If an element of a |
| 722 | ** result row is NULL then the corresponding string pointer for the |
| 723 | ** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the |
| 724 | ** sqlite3_exec() callback is an array of pointers to strings where each |
| 725 | ** entry represents the name of corresponding result column as obtained |
| 726 | ** from [sqlite3_column_name()]. |
| 727 | ** |
| 728 | ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer |
| 729 | ** to an empty string, or a pointer that contains only whitespace and/or |
| 730 | ** SQL comments, then no SQL statements are evaluated and the database |
| @@ -906,11 +906,11 @@ | |
| 906 | ** Applications should not depend on the historical behavior. |
| 907 | ** |
| 908 | ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
| 909 | ** [sqlite3_open_v2()] does *not* cause the underlying database file |
| 910 | ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
| 911 | ** [sqlite3_open_v2()] has historically be a no-op and might become an |
| 912 | ** error in future versions of SQLite. |
| 913 | */ |
| 914 | #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
| 915 | #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
| 916 | #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ |
| @@ -1000,11 +1000,11 @@ | |
| 1000 | ** CAPI3REF: File Locking Levels |
| 1001 | ** |
| 1002 | ** SQLite uses one of these integer values as the second |
| 1003 | ** argument to calls it makes to the xLock() and xUnlock() methods |
| 1004 | ** of an [sqlite3_io_methods] object. These values are ordered from |
| 1005 | ** lest restrictive to most restrictive. |
| 1006 | ** |
| 1007 | ** The argument to xLock() is always SHARED or higher. The argument to |
| 1008 | ** xUnlock is either SHARED or NONE. |
| 1009 | */ |
| 1010 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
| @@ -1316,11 +1316,11 @@ | |
| 1316 | ** reason, the entire database file will be overwritten by the current |
| 1317 | ** transaction. This is used by VACUUM operations. |
| 1318 | ** |
| 1319 | ** <li>[[SQLITE_FCNTL_VFSNAME]] |
| 1320 | ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
| 1321 | ** all [VFSes] in the VFS stack. The names are of all VFS shims and the |
| 1322 | ** final bottom-level VFS are written into memory obtained from |
| 1323 | ** [sqlite3_malloc()] and the result is stored in the char* variable |
| 1324 | ** that the fourth parameter of [sqlite3_file_control()] points to. |
| 1325 | ** The caller is responsible for freeing the memory when done. As with |
| 1326 | ** all file-control actions, there is no guarantee that this will actually |
| @@ -1330,11 +1330,11 @@ | |
| 1330 | ** |
| 1331 | ** <li>[[SQLITE_FCNTL_VFS_POINTER]] |
| 1332 | ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level |
| 1333 | ** [VFSes] currently in use. ^(The argument X in |
| 1334 | ** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be |
| 1335 | ** of type "[sqlite3_vfs] **". This opcodes will set *X |
| 1336 | ** to a pointer to the top-level VFS.)^ |
| 1337 | ** ^When there are multiple VFS shims in the stack, this opcode finds the |
| 1338 | ** upper-most shim only. |
| 1339 | ** |
| 1340 | ** <li>[[SQLITE_FCNTL_PRAGMA]] |
| @@ -1520,11 +1520,11 @@ | |
| 1520 | ** record the fact that the pages have been checkpointed. |
| 1521 | ** |
| 1522 | ** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
| 1523 | ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
| 1524 | ** whether or not there is a database client in another process with a wal-mode |
| 1525 | ** transaction open on the database or not. It is only available on unix.The |
| 1526 | ** (void*) argument passed with this file-control should be a pointer to a |
| 1527 | ** value of type (int). The integer value is set to 1 if the database is a wal |
| 1528 | ** mode database and there exists at least one client in another process that |
| 1529 | ** currently has an SQL transaction open on the database. It is set to 0 if |
| 1530 | ** the database is not a wal-mode db, or if there is no such connection in any |
| @@ -1945,11 +1945,11 @@ | |
| 1945 | ** |
| 1946 | ** ^The sqlite3_initialize() routine is called internally by many other |
| 1947 | ** SQLite interfaces so that an application usually does not need to |
| 1948 | ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] |
| 1949 | ** calls sqlite3_initialize() so the SQLite library will be automatically |
| 1950 | ** initialized when [sqlite3_open()] is called if it has not be initialized |
| 1951 | ** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] |
| 1952 | ** compile-time option, then the automatic calls to sqlite3_initialize() |
| 1953 | ** are omitted and the application must call sqlite3_initialize() directly |
| 1954 | ** prior to using any other SQLite interface. For maximum portability, |
| 1955 | ** it is recommended that applications always invoke sqlite3_initialize() |
| @@ -2202,25 +2202,25 @@ | |
| 2202 | ** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which |
| 2203 | ** is a pointer to an instance of the [sqlite3_mem_methods] structure. |
| 2204 | ** The [sqlite3_mem_methods] |
| 2205 | ** structure is filled with the currently defined memory allocation routines.)^ |
| 2206 | ** This option can be used to overload the default memory allocation |
| 2207 | ** routines with a wrapper that simulations memory allocation failure or |
| 2208 | ** tracks memory usage, for example. </dd> |
| 2209 | ** |
| 2210 | ** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt> |
| 2211 | ** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes single argument of |
| 2212 | ** type int, interpreted as a boolean, which if true provides a hint to |
| 2213 | ** SQLite that it should avoid large memory allocations if possible. |
| 2214 | ** SQLite will run faster if it is free to make large memory allocations, |
| 2215 | ** but some application might prefer to run slower in exchange for |
| 2216 | ** guarantees about memory fragmentation that are possible if large |
| 2217 | ** allocations are avoided. This hint is normally off. |
| 2218 | ** </dd> |
| 2219 | ** |
| 2220 | ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> |
| 2221 | ** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int, |
| 2222 | ** interpreted as a boolean, which enables or disables the collection of |
| 2223 | ** memory allocation statistics. ^(When memory allocation statistics are |
| 2224 | ** disabled, the following SQLite interfaces become non-operational: |
| 2225 | ** <ul> |
| 2226 | ** <li> [sqlite3_hard_heap_limit64()] |
| @@ -2261,11 +2261,11 @@ | |
| 2261 | ** a page cache line is larger than sz bytes or if all of the pMem buffer |
| 2262 | ** is exhausted. |
| 2263 | ** ^If pMem is NULL and N is non-zero, then each database connection |
| 2264 | ** does an initial bulk allocation for page cache memory |
| 2265 | ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or |
| 2266 | ** of -1024*N bytes if N is negative, . ^If additional |
| 2267 | ** page cache memory is needed beyond what is provided by the initial |
| 2268 | ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each |
| 2269 | ** additional cache line. </dd> |
| 2270 | ** |
| 2271 | ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> |
| @@ -2290,11 +2290,11 @@ | |
| 2290 | ** |
| 2291 | ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> |
| 2292 | ** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a |
| 2293 | ** pointer to an instance of the [sqlite3_mutex_methods] structure. |
| 2294 | ** The argument specifies alternative low-level mutex routines to be used |
| 2295 | ** in place the mutex routines built into SQLite.)^ ^SQLite makes a copy of |
| 2296 | ** the content of the [sqlite3_mutex_methods] structure before the call to |
| 2297 | ** [sqlite3_config()] returns. ^If SQLite is compiled with |
| 2298 | ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then |
| 2299 | ** the entire mutexing subsystem is omitted from the build and hence calls to |
| 2300 | ** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will |
| @@ -2332,11 +2332,11 @@ | |
| 2332 | ** the interface to a custom page cache implementation.)^ |
| 2333 | ** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> |
| 2334 | ** |
| 2335 | ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> |
| 2336 | ** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which |
| 2337 | ** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies of |
| 2338 | ** the current page cache implementation into that object.)^ </dd> |
| 2339 | ** |
| 2340 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 2341 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 2342 | ** global [error log]. |
| @@ -2349,11 +2349,11 @@ | |
| 2349 | ** passed through as the first parameter to the application-defined logger |
| 2350 | ** function whenever that function is invoked. ^The second parameter to |
| 2351 | ** the logger function is a copy of the first parameter to the corresponding |
| 2352 | ** [sqlite3_log()] call and is intended to be a [result code] or an |
| 2353 | ** [extended result code]. ^The third parameter passed to the logger is |
| 2354 | ** log message after formatting via [sqlite3_snprintf()]. |
| 2355 | ** The SQLite logging interface is not reentrant; the logger function |
| 2356 | ** supplied by the application must not invoke any SQLite interface. |
| 2357 | ** In a multi-threaded application, the application-defined logger |
| 2358 | ** function must be threadsafe. </dd> |
| 2359 | ** |
| @@ -2540,11 +2540,11 @@ | |
| 2540 | ** CAPI3REF: Database Connection Configuration Options |
| 2541 | ** |
| 2542 | ** These constants are the available integer configuration options that |
| 2543 | ** can be passed as the second parameter to the [sqlite3_db_config()] interface. |
| 2544 | ** |
| 2545 | ** The [sqlite3_db_config()] interface is a var-args functions. It takes a |
| 2546 | ** variable number of parameters, though always at least two. The number of |
| 2547 | ** parameters passed into sqlite3_db_config() depends on which of these |
| 2548 | ** constants is given as the second parameter. This documentation page |
| 2549 | ** refers to parameters beyond the second as "arguments". Thus, when this |
| 2550 | ** page says "the N-th argument" it means "the N-th parameter past the |
| @@ -2674,12 +2674,12 @@ | |
| 2674 | ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 2675 | ** There must be two additional arguments. |
| 2676 | ** When the first argument to this interface is 1, then only the C-API is |
| 2677 | ** enabled and the SQL function remains disabled. If the first argument to |
| 2678 | ** this interface is 0, then both the C-API and the SQL function are disabled. |
| 2679 | ** If the first argument is -1, then no changes are made to state of either the |
| 2680 | ** C-API or the SQL function. |
| 2681 | ** The second parameter is a pointer to an integer into which |
| 2682 | ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface |
| 2683 | ** is disabled or enabled following this call. The second parameter may |
| 2684 | ** be a NULL pointer, in which case the new setting is not reported back. |
| 2685 | ** </dd> |
| @@ -2793,11 +2793,11 @@ | |
| 2793 | ** </dd> |
| 2794 | ** |
| 2795 | ** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]] |
| 2796 | ** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt> |
| 2797 | ** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates |
| 2798 | ** the legacy behavior of the [ALTER TABLE RENAME] command such it |
| 2799 | ** behaves as it did prior to [version 3.24.0] (2018-06-04). See the |
| 2800 | ** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for |
| 2801 | ** additional information. This feature can also be turned on and off |
| 2802 | ** using the [PRAGMA legacy_alter_table] statement. |
| 2803 | ** </dd> |
| @@ -2842,11 +2842,11 @@ | |
| 2842 | ** |
| 2843 | ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
| 2844 | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
| 2845 | ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
| 2846 | ** the legacy file format flag. When activated, this flag causes all newly |
| 2847 | ** created database file to have a schema format version number (the 4-byte |
| 2848 | ** integer found at offset 44 into the database header) of 1. This in turn |
| 2849 | ** means that the resulting database file will be readable and writable by |
| 2850 | ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
| 2851 | ** newly created databases are generally not understandable by SQLite versions |
| 2852 | ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
| @@ -2869,11 +2869,11 @@ | |
| 2869 | ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
| 2870 | ** statistics. For statistics to be collected, the flag must be set on |
| 2871 | ** the database handle both when the SQL statement is prepared and when it |
| 2872 | ** is stepped. The flag is set (collection of statistics is enabled) |
| 2873 | ** by default. <p>This option takes two arguments: an integer and a pointer to |
| 2874 | ** an integer.. The first argument is 1, 0, or -1 to enable, disable, or |
| 2875 | ** leave unchanged the statement scanstatus option. If the second argument |
| 2876 | ** is not NULL, then the value of the statement scanstatus setting after |
| 2877 | ** processing the first argument is written into the integer that the second |
| 2878 | ** argument points to. |
| 2879 | ** </dd> |
| @@ -2912,12 +2912,12 @@ | |
| 2912 | ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]] |
| 2913 | ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt> |
| 2914 | ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the |
| 2915 | ** ability of the [ATTACH DATABASE] SQL command to open a database for writing. |
| 2916 | ** This capability is enabled by default. Applications can disable or |
| 2917 | ** reenable this capability using the current DBCONFIG option. If the |
| 2918 | ** the this capability is disabled, the [ATTACH] command will still work, |
| 2919 | ** but the database will be opened read-only. If this option is disabled, |
| 2920 | ** then the ability to create a new database using [ATTACH] is also disabled, |
| 2921 | ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE] |
| 2922 | ** option.<p> |
| 2923 | ** This option takes two arguments which are an integer and a pointer |
| @@ -2947,11 +2947,11 @@ | |
| 2947 | ** |
| 2948 | ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3> |
| 2949 | ** |
| 2950 | ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the |
| 2951 | ** overall call to [sqlite3_db_config()] has a total of four parameters. |
| 2952 | ** The first argument (the third parameter to sqlite3_db_config()) is a integer. |
| 2953 | ** The second argument is a pointer to an integer. If the first argument is 1, |
| 2954 | ** then the option becomes enabled. If the first integer argument is 0, then the |
| 2955 | ** option is disabled. If the first argument is -1, then the option setting |
| 2956 | ** is unchanged. The second argument, the pointer to an integer, may be NULL. |
| 2957 | ** If the second argument is not NULL, then a value of 0 or 1 is written into |
| @@ -3237,11 +3237,11 @@ | |
| 3237 | ** and comments that follow the final semicolon are ignored. |
| 3238 | ** |
| 3239 | ** ^These routines return 0 if the statement is incomplete. ^If a |
| 3240 | ** memory allocation fails, then SQLITE_NOMEM is returned. |
| 3241 | ** |
| 3242 | ** ^These routines do not parse the SQL statements thus |
| 3243 | ** will not detect syntactically incorrect SQL. |
| 3244 | ** |
| 3245 | ** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior |
| 3246 | ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked |
| 3247 | ** automatically by sqlite3_complete16(). If that initialization fails, |
| @@ -3354,11 +3354,11 @@ | |
| 3354 | ** Passing 0 to this function disables blocking locks altogether. Passing |
| 3355 | ** -1 to this function requests that the VFS blocks for a long time - |
| 3356 | ** indefinitely if possible. The results of passing any other negative value |
| 3357 | ** are undefined. |
| 3358 | ** |
| 3359 | ** Internally, each SQLite database handle store two timeout values - the |
| 3360 | ** busy-timeout (used for rollback mode databases, or if the VFS does not |
| 3361 | ** support blocking locks) and the setlk-timeout (used for blocking locks |
| 3362 | ** on wal-mode databases). The sqlite3_busy_timeout() method sets both |
| 3363 | ** values, this function sets only the setlk-timeout value. Therefore, |
| 3364 | ** to configure separate busy-timeout and setlk-timeout values for a single |
| @@ -3384,11 +3384,11 @@ | |
| 3384 | ** METHOD: sqlite3 |
| 3385 | ** |
| 3386 | ** This is a legacy interface that is preserved for backwards compatibility. |
| 3387 | ** Use of this interface is not recommended. |
| 3388 | ** |
| 3389 | ** Definition: A <b>result table</b> is memory data structure created by the |
| 3390 | ** [sqlite3_get_table()] interface. A result table records the |
| 3391 | ** complete query results from one or more queries. |
| 3392 | ** |
| 3393 | ** The table conceptually has a number of rows and columns. But |
| 3394 | ** these numbers are not part of the result table itself. These |
| @@ -3527,11 +3527,11 @@ | |
| 3527 | ** of a signed 32-bit integer. |
| 3528 | ** |
| 3529 | ** ^Calling sqlite3_free() with a pointer previously returned |
| 3530 | ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so |
| 3531 | ** that it might be reused. ^The sqlite3_free() routine is |
| 3532 | ** a no-op if is called with a NULL pointer. Passing a NULL pointer |
| 3533 | ** to sqlite3_free() is harmless. After being freed, memory |
| 3534 | ** should neither be read nor written. Even reading previously freed |
| 3535 | ** memory might result in a segmentation fault or other severe error. |
| 3536 | ** Memory corruption, a segmentation fault, or other severe error |
| 3537 | ** might result if sqlite3_free() is called with a non-NULL pointer that |
| @@ -3545,17 +3545,17 @@ | |
| 3545 | ** ^If the N parameter to sqlite3_realloc(X,N) is zero or |
| 3546 | ** negative then the behavior is exactly the same as calling |
| 3547 | ** sqlite3_free(X). |
| 3548 | ** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation |
| 3549 | ** of at least N bytes in size or NULL if insufficient memory is available. |
| 3550 | ** ^If M is the size of the prior allocation, then min(N,M) bytes |
| 3551 | ** of the prior allocation are copied into the beginning of buffer returned |
| 3552 | ** by sqlite3_realloc(X,N) and the prior allocation is freed. |
| 3553 | ** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the |
| 3554 | ** prior allocation is not freed. |
| 3555 | ** |
| 3556 | ** ^The sqlite3_realloc64(X,N) interfaces works the same as |
| 3557 | ** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead |
| 3558 | ** of a 32-bit signed integer. |
| 3559 | ** |
| 3560 | ** ^If X is a memory allocation previously obtained from sqlite3_malloc(), |
| 3561 | ** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then |
| @@ -3601,11 +3601,11 @@ | |
| 3601 | ** ^The [sqlite3_memory_highwater()] routine returns the maximum |
| 3602 | ** value of [sqlite3_memory_used()] since the high-water mark |
| 3603 | ** was last reset. ^The values returned by [sqlite3_memory_used()] and |
| 3604 | ** [sqlite3_memory_highwater()] include any overhead |
| 3605 | ** added by SQLite in its implementation of [sqlite3_malloc()], |
| 3606 | ** but not overhead added by the any underlying system library |
| 3607 | ** routines that [sqlite3_malloc()] may call. |
| 3608 | ** |
| 3609 | ** ^The memory high-water mark is reset to the current value of |
| 3610 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 3611 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| @@ -4053,19 +4053,19 @@ | |
| 4053 | ** attempt to use the same database connection at the same time. |
| 4054 | ** (Mutexes will block any actual concurrency, but in this mode |
| 4055 | ** there is no harm in trying.) |
| 4056 | ** |
| 4057 | ** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt> |
| 4058 | ** <dd>The database is opened [shared cache] enabled, overriding |
| 4059 | ** the default shared cache setting provided by |
| 4060 | ** [sqlite3_enable_shared_cache()].)^ |
| 4061 | ** The [use of shared cache mode is discouraged] and hence shared cache |
| 4062 | ** capabilities may be omitted from many builds of SQLite. In such cases, |
| 4063 | ** this option is a no-op. |
| 4064 | ** |
| 4065 | ** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
| 4066 | ** <dd>The database is opened [shared cache] disabled, overriding |
| 4067 | ** the default shared cache setting provided by |
| 4068 | ** [sqlite3_enable_shared_cache()].)^ |
| 4069 | ** |
| 4070 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 4071 | ** <dd>The database connection comes up in "extended result code mode". |
| @@ -74729,10 +74729,14 @@ | |
| 74729 | BtShared *pBt = p->pBt; |
| 74730 | assert( nReserve>=0 && nReserve<=255 ); |
| 74731 | sqlite3BtreeEnter(p); |
| 74732 | pBt->nReserveWanted = (u8)nReserve; |
| 74733 | x = pBt->pageSize - pBt->usableSize; |
| 74734 | if( nReserve<x ) nReserve = x; |
| 74735 | if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){ |
| 74736 | sqlite3BtreeLeave(p); |
| 74737 | return SQLITE_READONLY; |
| 74738 | } |
| @@ -95229,10 +95233,40 @@ | |
| 95229 | } |
| 95230 | pDest->flags &= ~MEM_Ephem; |
| 95231 | return rc; |
| 95232 | } |
| 95233 | |
| 95234 | |
| 95235 | /* |
| 95236 | ** Return the symbolic name for the data type of a pMem |
| 95237 | */ |
| 95238 | static const char *vdbeMemTypeName(Mem *pMem){ |
| @@ -95754,12 +95788,11 @@ | |
| 95754 | p->zErrMsg = sqlite3MPrintf(db, "%z: %s", p->zErrMsg, pOp->p4.z); |
| 95755 | } |
| 95756 | }else{ |
| 95757 | sqlite3VdbeError(p, "%s", pOp->p4.z); |
| 95758 | } |
| 95759 | pcx = (int)(pOp - aOp); |
| 95760 | sqlite3_log(pOp->p1, "abort at %d: %s; [%s]", pcx, p->zErrMsg, p->zSql); |
| 95761 | } |
| 95762 | rc = sqlite3VdbeHalt(p); |
| 95763 | assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR ); |
| 95764 | if( rc==SQLITE_BUSY ){ |
| 95765 | p->rc = SQLITE_BUSY; |
| @@ -103619,12 +103652,11 @@ | |
| 103619 | sqlite3VdbeError(p, "%s", sqlite3ErrStr(rc)); |
| 103620 | } |
| 103621 | p->rc = rc; |
| 103622 | sqlite3SystemError(db, rc); |
| 103623 | testcase( sqlite3GlobalConfig.xLog!=0 ); |
| 103624 | sqlite3_log(rc, "statement aborts at %d: %s; [%s]", |
| 103625 | (int)(pOp - aOp), p->zErrMsg, p->zSql); |
| 103626 | if( p->eVdbeState==VDBE_RUN_STATE ) sqlite3VdbeHalt(p); |
| 103627 | if( rc==SQLITE_IOERR_NOMEM ) sqlite3OomFault(db); |
| 103628 | if( rc==SQLITE_CORRUPT && db->autoCommit==0 ){ |
| 103629 | db->flags |= SQLITE_CorruptRdOnly; |
| 103630 | } |
| @@ -257401,11 +257433,11 @@ | |
| 257401 | int nArg, /* Number of args */ |
| 257402 | sqlite3_value **apUnused /* Function arguments */ |
| 257403 | ){ |
| 257404 | assert( nArg==0 ); |
| 257405 | UNUSED_PARAM2(nArg, apUnused); |
| 257406 | sqlite3_result_text(pCtx, "fts5: 2025-06-19 20:19:12 a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d", -1, SQLITE_TRANSIENT); |
| 257407 | } |
| 257408 | |
| 257409 | /* |
| 257410 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257411 | ** |
| 257412 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** cf61cd359e666c66b6bba4407a653c799f7f with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | |
| 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | */ |
| 468 | #define SQLITE_VERSION "3.51.0" |
| 469 | #define SQLITE_VERSION_NUMBER 3051000 |
| 470 | #define SQLITE_SOURCE_ID "2025-06-23 16:51:33 cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -485,13 +485,13 @@ | |
| 485 | ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); |
| 486 | ** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); |
| 487 | ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
| 488 | ** </pre></blockquote>)^ |
| 489 | ** |
| 490 | ** ^The sqlite3_version[] string constant contains the text of the |
| 491 | ** [SQLITE_VERSION] macro. ^The sqlite3_libversion() function returns a |
| 492 | ** pointer to the sqlite3_version[] string constant. The sqlite3_libversion() |
| 493 | ** function is provided for use in DLLs since DLL users usually do not have |
| 494 | ** direct access to string constants within the DLL. ^The |
| 495 | ** sqlite3_libversion_number() function returns an integer equal to |
| 496 | ** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns |
| 497 | ** a pointer to a string constant whose value is the same as the |
| @@ -687,11 +687,11 @@ | |
| 687 | ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], |
| 688 | ** that allows an application to run multiple statements of SQL |
| 689 | ** without having to use a lot of C code. |
| 690 | ** |
| 691 | ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, |
| 692 | ** semicolon-separated SQL statements passed into its 2nd argument, |
| 693 | ** in the context of the [database connection] passed in as its 1st |
| 694 | ** argument. ^If the callback function of the 3rd argument to |
| 695 | ** sqlite3_exec() is not NULL, then it is invoked for each result row |
| 696 | ** coming out of the evaluated SQL statements. ^The 4th argument to |
| 697 | ** sqlite3_exec() is relayed through to the 1st argument of each |
| @@ -720,11 +720,11 @@ | |
| 720 | ** callback is an array of pointers to strings obtained as if from |
| 721 | ** [sqlite3_column_text()], one for each column. ^If an element of a |
| 722 | ** result row is NULL then the corresponding string pointer for the |
| 723 | ** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the |
| 724 | ** sqlite3_exec() callback is an array of pointers to strings where each |
| 725 | ** entry represents the name of a corresponding result column as obtained |
| 726 | ** from [sqlite3_column_name()]. |
| 727 | ** |
| 728 | ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer |
| 729 | ** to an empty string, or a pointer that contains only whitespace and/or |
| 730 | ** SQL comments, then no SQL statements are evaluated and the database |
| @@ -906,11 +906,11 @@ | |
| 906 | ** Applications should not depend on the historical behavior. |
| 907 | ** |
| 908 | ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
| 909 | ** [sqlite3_open_v2()] does *not* cause the underlying database file |
| 910 | ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
| 911 | ** [sqlite3_open_v2()] has historically been a no-op and might become an |
| 912 | ** error in future versions of SQLite. |
| 913 | */ |
| 914 | #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
| 915 | #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
| 916 | #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ |
| @@ -1000,11 +1000,11 @@ | |
| 1000 | ** CAPI3REF: File Locking Levels |
| 1001 | ** |
| 1002 | ** SQLite uses one of these integer values as the second |
| 1003 | ** argument to calls it makes to the xLock() and xUnlock() methods |
| 1004 | ** of an [sqlite3_io_methods] object. These values are ordered from |
| 1005 | ** least restrictive to most restrictive. |
| 1006 | ** |
| 1007 | ** The argument to xLock() is always SHARED or higher. The argument to |
| 1008 | ** xUnlock is either SHARED or NONE. |
| 1009 | */ |
| 1010 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
| @@ -1316,11 +1316,11 @@ | |
| 1316 | ** reason, the entire database file will be overwritten by the current |
| 1317 | ** transaction. This is used by VACUUM operations. |
| 1318 | ** |
| 1319 | ** <li>[[SQLITE_FCNTL_VFSNAME]] |
| 1320 | ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
| 1321 | ** all [VFSes] in the VFS stack. The names of all VFS shims and the |
| 1322 | ** final bottom-level VFS are written into memory obtained from |
| 1323 | ** [sqlite3_malloc()] and the result is stored in the char* variable |
| 1324 | ** that the fourth parameter of [sqlite3_file_control()] points to. |
| 1325 | ** The caller is responsible for freeing the memory when done. As with |
| 1326 | ** all file-control actions, there is no guarantee that this will actually |
| @@ -1330,11 +1330,11 @@ | |
| 1330 | ** |
| 1331 | ** <li>[[SQLITE_FCNTL_VFS_POINTER]] |
| 1332 | ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level |
| 1333 | ** [VFSes] currently in use. ^(The argument X in |
| 1334 | ** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be |
| 1335 | ** of type "[sqlite3_vfs] **". This opcode will set *X |
| 1336 | ** to a pointer to the top-level VFS.)^ |
| 1337 | ** ^When there are multiple VFS shims in the stack, this opcode finds the |
| 1338 | ** upper-most shim only. |
| 1339 | ** |
| 1340 | ** <li>[[SQLITE_FCNTL_PRAGMA]] |
| @@ -1520,11 +1520,11 @@ | |
| 1520 | ** record the fact that the pages have been checkpointed. |
| 1521 | ** |
| 1522 | ** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
| 1523 | ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
| 1524 | ** whether or not there is a database client in another process with a wal-mode |
| 1525 | ** transaction open on the database or not. It is only available on unix. The |
| 1526 | ** (void*) argument passed with this file-control should be a pointer to a |
| 1527 | ** value of type (int). The integer value is set to 1 if the database is a wal |
| 1528 | ** mode database and there exists at least one client in another process that |
| 1529 | ** currently has an SQL transaction open on the database. It is set to 0 if |
| 1530 | ** the database is not a wal-mode db, or if there is no such connection in any |
| @@ -1945,11 +1945,11 @@ | |
| 1945 | ** |
| 1946 | ** ^The sqlite3_initialize() routine is called internally by many other |
| 1947 | ** SQLite interfaces so that an application usually does not need to |
| 1948 | ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] |
| 1949 | ** calls sqlite3_initialize() so the SQLite library will be automatically |
| 1950 | ** initialized when [sqlite3_open()] is called if it has not been initialized |
| 1951 | ** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] |
| 1952 | ** compile-time option, then the automatic calls to sqlite3_initialize() |
| 1953 | ** are omitted and the application must call sqlite3_initialize() directly |
| 1954 | ** prior to using any other SQLite interface. For maximum portability, |
| 1955 | ** it is recommended that applications always invoke sqlite3_initialize() |
| @@ -2202,25 +2202,25 @@ | |
| 2202 | ** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which |
| 2203 | ** is a pointer to an instance of the [sqlite3_mem_methods] structure. |
| 2204 | ** The [sqlite3_mem_methods] |
| 2205 | ** structure is filled with the currently defined memory allocation routines.)^ |
| 2206 | ** This option can be used to overload the default memory allocation |
| 2207 | ** routines with a wrapper that simulates memory allocation failure or |
| 2208 | ** tracks memory usage, for example. </dd> |
| 2209 | ** |
| 2210 | ** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt> |
| 2211 | ** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of |
| 2212 | ** type int, interpreted as a boolean, which if true provides a hint to |
| 2213 | ** SQLite that it should avoid large memory allocations if possible. |
| 2214 | ** SQLite will run faster if it is free to make large memory allocations, |
| 2215 | ** but some applications might prefer to run slower in exchange for |
| 2216 | ** guarantees about memory fragmentation that are possible if large |
| 2217 | ** allocations are avoided. This hint is normally off. |
| 2218 | ** </dd> |
| 2219 | ** |
| 2220 | ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> |
| 2221 | ** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type int, |
| 2222 | ** interpreted as a boolean, which enables or disables the collection of |
| 2223 | ** memory allocation statistics. ^(When memory allocation statistics are |
| 2224 | ** disabled, the following SQLite interfaces become non-operational: |
| 2225 | ** <ul> |
| 2226 | ** <li> [sqlite3_hard_heap_limit64()] |
| @@ -2261,11 +2261,11 @@ | |
| 2261 | ** a page cache line is larger than sz bytes or if all of the pMem buffer |
| 2262 | ** is exhausted. |
| 2263 | ** ^If pMem is NULL and N is non-zero, then each database connection |
| 2264 | ** does an initial bulk allocation for page cache memory |
| 2265 | ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or |
| 2266 | ** of -1024*N bytes if N is negative. ^If additional |
| 2267 | ** page cache memory is needed beyond what is provided by the initial |
| 2268 | ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each |
| 2269 | ** additional cache line. </dd> |
| 2270 | ** |
| 2271 | ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> |
| @@ -2290,11 +2290,11 @@ | |
| 2290 | ** |
| 2291 | ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> |
| 2292 | ** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a |
| 2293 | ** pointer to an instance of the [sqlite3_mutex_methods] structure. |
| 2294 | ** The argument specifies alternative low-level mutex routines to be used |
| 2295 | ** in place of the mutex routines built into SQLite.)^ ^SQLite makes a copy of |
| 2296 | ** the content of the [sqlite3_mutex_methods] structure before the call to |
| 2297 | ** [sqlite3_config()] returns. ^If SQLite is compiled with |
| 2298 | ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then |
| 2299 | ** the entire mutexing subsystem is omitted from the build and hence calls to |
| 2300 | ** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will |
| @@ -2332,11 +2332,11 @@ | |
| 2332 | ** the interface to a custom page cache implementation.)^ |
| 2333 | ** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> |
| 2334 | ** |
| 2335 | ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> |
| 2336 | ** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which |
| 2337 | ** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies off |
| 2338 | ** the current page cache implementation into that object.)^ </dd> |
| 2339 | ** |
| 2340 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 2341 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 2342 | ** global [error log]. |
| @@ -2349,11 +2349,11 @@ | |
| 2349 | ** passed through as the first parameter to the application-defined logger |
| 2350 | ** function whenever that function is invoked. ^The second parameter to |
| 2351 | ** the logger function is a copy of the first parameter to the corresponding |
| 2352 | ** [sqlite3_log()] call and is intended to be a [result code] or an |
| 2353 | ** [extended result code]. ^The third parameter passed to the logger is |
| 2354 | ** a log message after formatting via [sqlite3_snprintf()]. |
| 2355 | ** The SQLite logging interface is not reentrant; the logger function |
| 2356 | ** supplied by the application must not invoke any SQLite interface. |
| 2357 | ** In a multi-threaded application, the application-defined logger |
| 2358 | ** function must be threadsafe. </dd> |
| 2359 | ** |
| @@ -2540,11 +2540,11 @@ | |
| 2540 | ** CAPI3REF: Database Connection Configuration Options |
| 2541 | ** |
| 2542 | ** These constants are the available integer configuration options that |
| 2543 | ** can be passed as the second parameter to the [sqlite3_db_config()] interface. |
| 2544 | ** |
| 2545 | ** The [sqlite3_db_config()] interface is a var-args function. It takes a |
| 2546 | ** variable number of parameters, though always at least two. The number of |
| 2547 | ** parameters passed into sqlite3_db_config() depends on which of these |
| 2548 | ** constants is given as the second parameter. This documentation page |
| 2549 | ** refers to parameters beyond the second as "arguments". Thus, when this |
| 2550 | ** page says "the N-th argument" it means "the N-th parameter past the |
| @@ -2674,12 +2674,12 @@ | |
| 2674 | ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 2675 | ** There must be two additional arguments. |
| 2676 | ** When the first argument to this interface is 1, then only the C-API is |
| 2677 | ** enabled and the SQL function remains disabled. If the first argument to |
| 2678 | ** this interface is 0, then both the C-API and the SQL function are disabled. |
| 2679 | ** If the first argument is -1, then no changes are made to the state of either |
| 2680 | ** the C-API or the SQL function. |
| 2681 | ** The second parameter is a pointer to an integer into which |
| 2682 | ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface |
| 2683 | ** is disabled or enabled following this call. The second parameter may |
| 2684 | ** be a NULL pointer, in which case the new setting is not reported back. |
| 2685 | ** </dd> |
| @@ -2793,11 +2793,11 @@ | |
| 2793 | ** </dd> |
| 2794 | ** |
| 2795 | ** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]] |
| 2796 | ** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt> |
| 2797 | ** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates |
| 2798 | ** the legacy behavior of the [ALTER TABLE RENAME] command such that it |
| 2799 | ** behaves as it did prior to [version 3.24.0] (2018-06-04). See the |
| 2800 | ** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for |
| 2801 | ** additional information. This feature can also be turned on and off |
| 2802 | ** using the [PRAGMA legacy_alter_table] statement. |
| 2803 | ** </dd> |
| @@ -2842,11 +2842,11 @@ | |
| 2842 | ** |
| 2843 | ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
| 2844 | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
| 2845 | ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
| 2846 | ** the legacy file format flag. When activated, this flag causes all newly |
| 2847 | ** created database files to have a schema format version number (the 4-byte |
| 2848 | ** integer found at offset 44 into the database header) of 1. This in turn |
| 2849 | ** means that the resulting database file will be readable and writable by |
| 2850 | ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
| 2851 | ** newly created databases are generally not understandable by SQLite versions |
| 2852 | ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
| @@ -2869,11 +2869,11 @@ | |
| 2869 | ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
| 2870 | ** statistics. For statistics to be collected, the flag must be set on |
| 2871 | ** the database handle both when the SQL statement is prepared and when it |
| 2872 | ** is stepped. The flag is set (collection of statistics is enabled) |
| 2873 | ** by default. <p>This option takes two arguments: an integer and a pointer to |
| 2874 | ** an integer. The first argument is 1, 0, or -1 to enable, disable, or |
| 2875 | ** leave unchanged the statement scanstatus option. If the second argument |
| 2876 | ** is not NULL, then the value of the statement scanstatus setting after |
| 2877 | ** processing the first argument is written into the integer that the second |
| 2878 | ** argument points to. |
| 2879 | ** </dd> |
| @@ -2912,12 +2912,12 @@ | |
| 2912 | ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]] |
| 2913 | ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt> |
| 2914 | ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the |
| 2915 | ** ability of the [ATTACH DATABASE] SQL command to open a database for writing. |
| 2916 | ** This capability is enabled by default. Applications can disable or |
| 2917 | ** reenable this capability using the current DBCONFIG option. If |
| 2918 | ** this capability is disabled, the [ATTACH] command will still work, |
| 2919 | ** but the database will be opened read-only. If this option is disabled, |
| 2920 | ** then the ability to create a new database using [ATTACH] is also disabled, |
| 2921 | ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE] |
| 2922 | ** option.<p> |
| 2923 | ** This option takes two arguments which are an integer and a pointer |
| @@ -2947,11 +2947,11 @@ | |
| 2947 | ** |
| 2948 | ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3> |
| 2949 | ** |
| 2950 | ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the |
| 2951 | ** overall call to [sqlite3_db_config()] has a total of four parameters. |
| 2952 | ** The first argument (the third parameter to sqlite3_db_config()) is an integer. |
| 2953 | ** The second argument is a pointer to an integer. If the first argument is 1, |
| 2954 | ** then the option becomes enabled. If the first integer argument is 0, then the |
| 2955 | ** option is disabled. If the first argument is -1, then the option setting |
| 2956 | ** is unchanged. The second argument, the pointer to an integer, may be NULL. |
| 2957 | ** If the second argument is not NULL, then a value of 0 or 1 is written into |
| @@ -3237,11 +3237,11 @@ | |
| 3237 | ** and comments that follow the final semicolon are ignored. |
| 3238 | ** |
| 3239 | ** ^These routines return 0 if the statement is incomplete. ^If a |
| 3240 | ** memory allocation fails, then SQLITE_NOMEM is returned. |
| 3241 | ** |
| 3242 | ** ^These routines do not parse the SQL statements and thus |
| 3243 | ** will not detect syntactically incorrect SQL. |
| 3244 | ** |
| 3245 | ** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior |
| 3246 | ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked |
| 3247 | ** automatically by sqlite3_complete16(). If that initialization fails, |
| @@ -3354,11 +3354,11 @@ | |
| 3354 | ** Passing 0 to this function disables blocking locks altogether. Passing |
| 3355 | ** -1 to this function requests that the VFS blocks for a long time - |
| 3356 | ** indefinitely if possible. The results of passing any other negative value |
| 3357 | ** are undefined. |
| 3358 | ** |
| 3359 | ** Internally, each SQLite database handle stores two timeout values - the |
| 3360 | ** busy-timeout (used for rollback mode databases, or if the VFS does not |
| 3361 | ** support blocking locks) and the setlk-timeout (used for blocking locks |
| 3362 | ** on wal-mode databases). The sqlite3_busy_timeout() method sets both |
| 3363 | ** values, this function sets only the setlk-timeout value. Therefore, |
| 3364 | ** to configure separate busy-timeout and setlk-timeout values for a single |
| @@ -3384,11 +3384,11 @@ | |
| 3384 | ** METHOD: sqlite3 |
| 3385 | ** |
| 3386 | ** This is a legacy interface that is preserved for backwards compatibility. |
| 3387 | ** Use of this interface is not recommended. |
| 3388 | ** |
| 3389 | ** Definition: A <b>result table</b> is a memory data structure created by the |
| 3390 | ** [sqlite3_get_table()] interface. A result table records the |
| 3391 | ** complete query results from one or more queries. |
| 3392 | ** |
| 3393 | ** The table conceptually has a number of rows and columns. But |
| 3394 | ** these numbers are not part of the result table itself. These |
| @@ -3527,11 +3527,11 @@ | |
| 3527 | ** of a signed 32-bit integer. |
| 3528 | ** |
| 3529 | ** ^Calling sqlite3_free() with a pointer previously returned |
| 3530 | ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so |
| 3531 | ** that it might be reused. ^The sqlite3_free() routine is |
| 3532 | ** a no-op if it is called with a NULL pointer. Passing a NULL pointer |
| 3533 | ** to sqlite3_free() is harmless. After being freed, memory |
| 3534 | ** should neither be read nor written. Even reading previously freed |
| 3535 | ** memory might result in a segmentation fault or other severe error. |
| 3536 | ** Memory corruption, a segmentation fault, or other severe error |
| 3537 | ** might result if sqlite3_free() is called with a non-NULL pointer that |
| @@ -3545,17 +3545,17 @@ | |
| 3545 | ** ^If the N parameter to sqlite3_realloc(X,N) is zero or |
| 3546 | ** negative then the behavior is exactly the same as calling |
| 3547 | ** sqlite3_free(X). |
| 3548 | ** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation |
| 3549 | ** of at least N bytes in size or NULL if insufficient memory is available. |
| 3550 | ** ^If M is the size of the prior allocation, then min(N,M) bytes of the |
| 3551 | ** prior allocation are copied into the beginning of the buffer returned |
| 3552 | ** by sqlite3_realloc(X,N) and the prior allocation is freed. |
| 3553 | ** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the |
| 3554 | ** prior allocation is not freed. |
| 3555 | ** |
| 3556 | ** ^The sqlite3_realloc64(X,N) interface works the same as |
| 3557 | ** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead |
| 3558 | ** of a 32-bit signed integer. |
| 3559 | ** |
| 3560 | ** ^If X is a memory allocation previously obtained from sqlite3_malloc(), |
| 3561 | ** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then |
| @@ -3601,11 +3601,11 @@ | |
| 3601 | ** ^The [sqlite3_memory_highwater()] routine returns the maximum |
| 3602 | ** value of [sqlite3_memory_used()] since the high-water mark |
| 3603 | ** was last reset. ^The values returned by [sqlite3_memory_used()] and |
| 3604 | ** [sqlite3_memory_highwater()] include any overhead |
| 3605 | ** added by SQLite in its implementation of [sqlite3_malloc()], |
| 3606 | ** but not overhead added by any underlying system library |
| 3607 | ** routines that [sqlite3_malloc()] may call. |
| 3608 | ** |
| 3609 | ** ^The memory high-water mark is reset to the current value of |
| 3610 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 3611 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| @@ -4053,19 +4053,19 @@ | |
| 4053 | ** attempt to use the same database connection at the same time. |
| 4054 | ** (Mutexes will block any actual concurrency, but in this mode |
| 4055 | ** there is no harm in trying.) |
| 4056 | ** |
| 4057 | ** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt> |
| 4058 | ** <dd>The database is opened with [shared cache] enabled, overriding |
| 4059 | ** the default shared cache setting provided by |
| 4060 | ** [sqlite3_enable_shared_cache()].)^ |
| 4061 | ** The [use of shared cache mode is discouraged] and hence shared cache |
| 4062 | ** capabilities may be omitted from many builds of SQLite. In such cases, |
| 4063 | ** this option is a no-op. |
| 4064 | ** |
| 4065 | ** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
| 4066 | ** <dd>The database is opened with [shared cache] disabled, overriding |
| 4067 | ** the default shared cache setting provided by |
| 4068 | ** [sqlite3_enable_shared_cache()].)^ |
| 4069 | ** |
| 4070 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 4071 | ** <dd>The database connection comes up in "extended result code mode". |
| @@ -74729,10 +74729,14 @@ | |
| 74729 | BtShared *pBt = p->pBt; |
| 74730 | assert( nReserve>=0 && nReserve<=255 ); |
| 74731 | sqlite3BtreeEnter(p); |
| 74732 | pBt->nReserveWanted = (u8)nReserve; |
| 74733 | x = pBt->pageSize - pBt->usableSize; |
| 74734 | if( x==nReserve && (pageSize==0 || (u32)pageSize==pBt->pageSize) ){ |
| 74735 | sqlite3BtreeLeave(p); |
| 74736 | return SQLITE_OK; |
| 74737 | } |
| 74738 | if( nReserve<x ) nReserve = x; |
| 74739 | if( pBt->btsFlags & BTS_PAGESIZE_FIXED ){ |
| 74740 | sqlite3BtreeLeave(p); |
| 74741 | return SQLITE_READONLY; |
| 74742 | } |
| @@ -95229,10 +95233,40 @@ | |
| 95233 | } |
| 95234 | pDest->flags &= ~MEM_Ephem; |
| 95235 | return rc; |
| 95236 | } |
| 95237 | |
| 95238 | /* |
| 95239 | ** Send a "statement aborts" message to the error log. |
| 95240 | */ |
| 95241 | static SQLITE_NOINLINE void sqlite3VdbeLogAbort( |
| 95242 | Vdbe *p, /* The statement that is running at the time of failure */ |
| 95243 | int rc, /* Error code */ |
| 95244 | Op *pOp, /* Opcode that filed */ |
| 95245 | Op *aOp /* All opcodes */ |
| 95246 | ){ |
| 95247 | const char *zSql = p->zSql; /* Original SQL text */ |
| 95248 | const char *zPrefix = ""; /* Prefix added to SQL text */ |
| 95249 | int pc; /* Opcode address */ |
| 95250 | char zXtra[100]; /* Buffer space to store zPrefix */ |
| 95251 | |
| 95252 | if( p->pFrame ){ |
| 95253 | assert( aOp[0].opcode==OP_Init ); |
| 95254 | if( aOp[0].p4.z!=0 ){ |
| 95255 | assert( aOp[0].p4.z[0]=='-' |
| 95256 | && aOp[0].p4.z[1]=='-' |
| 95257 | && aOp[0].p4.z[2]==' ' ); |
| 95258 | sqlite3_snprintf(sizeof(zXtra), zXtra,"/* %s */ ",aOp[0].p4.z+3); |
| 95259 | zPrefix = zXtra; |
| 95260 | }else{ |
| 95261 | zPrefix = "/* unknown trigger */ "; |
| 95262 | } |
| 95263 | } |
| 95264 | pc = (int)(pOp - aOp); |
| 95265 | sqlite3_log(rc, "statement aborts at %d: %s; [%s%s]", |
| 95266 | pc, p->zErrMsg, zPrefix, zSql); |
| 95267 | } |
| 95268 | |
| 95269 | /* |
| 95270 | ** Return the symbolic name for the data type of a pMem |
| 95271 | */ |
| 95272 | static const char *vdbeMemTypeName(Mem *pMem){ |
| @@ -95754,12 +95788,11 @@ | |
| 95788 | p->zErrMsg = sqlite3MPrintf(db, "%z: %s", p->zErrMsg, pOp->p4.z); |
| 95789 | } |
| 95790 | }else{ |
| 95791 | sqlite3VdbeError(p, "%s", pOp->p4.z); |
| 95792 | } |
| 95793 | sqlite3VdbeLogAbort(p, pOp->p1, pOp, aOp); |
| 95794 | } |
| 95795 | rc = sqlite3VdbeHalt(p); |
| 95796 | assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR ); |
| 95797 | if( rc==SQLITE_BUSY ){ |
| 95798 | p->rc = SQLITE_BUSY; |
| @@ -103619,12 +103652,11 @@ | |
| 103652 | sqlite3VdbeError(p, "%s", sqlite3ErrStr(rc)); |
| 103653 | } |
| 103654 | p->rc = rc; |
| 103655 | sqlite3SystemError(db, rc); |
| 103656 | testcase( sqlite3GlobalConfig.xLog!=0 ); |
| 103657 | sqlite3VdbeLogAbort(p, rc, pOp, aOp); |
| 103658 | if( p->eVdbeState==VDBE_RUN_STATE ) sqlite3VdbeHalt(p); |
| 103659 | if( rc==SQLITE_IOERR_NOMEM ) sqlite3OomFault(db); |
| 103660 | if( rc==SQLITE_CORRUPT && db->autoCommit==0 ){ |
| 103661 | db->flags |= SQLITE_CorruptRdOnly; |
| 103662 | } |
| @@ -257401,11 +257433,11 @@ | |
| 257433 | int nArg, /* Number of args */ |
| 257434 | sqlite3_value **apUnused /* Function arguments */ |
| 257435 | ){ |
| 257436 | assert( nArg==0 ); |
| 257437 | UNUSED_PARAM2(nArg, apUnused); |
| 257438 | sqlite3_result_text(pCtx, "fts5: 2025-06-23 16:51:33 cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a", -1, SQLITE_TRANSIENT); |
| 257439 | } |
| 257440 | |
| 257441 | /* |
| 257442 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257443 | ** |
| 257444 |
+39
-39
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | -#define SQLITE_SOURCE_ID "2025-06-19 20:19:12 a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d" | |
| 151 | +#define SQLITE_SOURCE_ID "2025-06-23 16:51:33 cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a" | |
| 152 | 152 | |
| 153 | 153 | /* |
| 154 | 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | 156 | ** |
| @@ -166,13 +166,13 @@ | ||
| 166 | 166 | ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); |
| 167 | 167 | ** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); |
| 168 | 168 | ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
| 169 | 169 | ** </pre></blockquote>)^ |
| 170 | 170 | ** |
| 171 | -** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] | |
| 172 | -** macro. ^The sqlite3_libversion() function returns a pointer to the | |
| 173 | -** to the sqlite3_version[] string constant. The sqlite3_libversion() | |
| 171 | +** ^The sqlite3_version[] string constant contains the text of the | |
| 172 | +** [SQLITE_VERSION] macro. ^The sqlite3_libversion() function returns a | |
| 173 | +** pointer to the sqlite3_version[] string constant. The sqlite3_libversion() | |
| 174 | 174 | ** function is provided for use in DLLs since DLL users usually do not have |
| 175 | 175 | ** direct access to string constants within the DLL. ^The |
| 176 | 176 | ** sqlite3_libversion_number() function returns an integer equal to |
| 177 | 177 | ** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns |
| 178 | 178 | ** a pointer to a string constant whose value is the same as the |
| @@ -368,11 +368,11 @@ | ||
| 368 | 368 | ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], |
| 369 | 369 | ** that allows an application to run multiple statements of SQL |
| 370 | 370 | ** without having to use a lot of C code. |
| 371 | 371 | ** |
| 372 | 372 | ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, |
| 373 | -** semicolon-separate SQL statements passed into its 2nd argument, | |
| 373 | +** semicolon-separated SQL statements passed into its 2nd argument, | |
| 374 | 374 | ** in the context of the [database connection] passed in as its 1st |
| 375 | 375 | ** argument. ^If the callback function of the 3rd argument to |
| 376 | 376 | ** sqlite3_exec() is not NULL, then it is invoked for each result row |
| 377 | 377 | ** coming out of the evaluated SQL statements. ^The 4th argument to |
| 378 | 378 | ** sqlite3_exec() is relayed through to the 1st argument of each |
| @@ -401,11 +401,11 @@ | ||
| 401 | 401 | ** callback is an array of pointers to strings obtained as if from |
| 402 | 402 | ** [sqlite3_column_text()], one for each column. ^If an element of a |
| 403 | 403 | ** result row is NULL then the corresponding string pointer for the |
| 404 | 404 | ** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the |
| 405 | 405 | ** sqlite3_exec() callback is an array of pointers to strings where each |
| 406 | -** entry represents the name of corresponding result column as obtained | |
| 406 | +** entry represents the name of a corresponding result column as obtained | |
| 407 | 407 | ** from [sqlite3_column_name()]. |
| 408 | 408 | ** |
| 409 | 409 | ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer |
| 410 | 410 | ** to an empty string, or a pointer that contains only whitespace and/or |
| 411 | 411 | ** SQL comments, then no SQL statements are evaluated and the database |
| @@ -587,11 +587,11 @@ | ||
| 587 | 587 | ** Applications should not depend on the historical behavior. |
| 588 | 588 | ** |
| 589 | 589 | ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
| 590 | 590 | ** [sqlite3_open_v2()] does *not* cause the underlying database file |
| 591 | 591 | ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
| 592 | -** [sqlite3_open_v2()] has historically be a no-op and might become an | |
| 592 | +** [sqlite3_open_v2()] has historically been a no-op and might become an | |
| 593 | 593 | ** error in future versions of SQLite. |
| 594 | 594 | */ |
| 595 | 595 | #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
| 596 | 596 | #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
| 597 | 597 | #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ |
| @@ -681,11 +681,11 @@ | ||
| 681 | 681 | ** CAPI3REF: File Locking Levels |
| 682 | 682 | ** |
| 683 | 683 | ** SQLite uses one of these integer values as the second |
| 684 | 684 | ** argument to calls it makes to the xLock() and xUnlock() methods |
| 685 | 685 | ** of an [sqlite3_io_methods] object. These values are ordered from |
| 686 | -** lest restrictive to most restrictive. | |
| 686 | +** least restrictive to most restrictive. | |
| 687 | 687 | ** |
| 688 | 688 | ** The argument to xLock() is always SHARED or higher. The argument to |
| 689 | 689 | ** xUnlock is either SHARED or NONE. |
| 690 | 690 | */ |
| 691 | 691 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
| @@ -997,11 +997,11 @@ | ||
| 997 | 997 | ** reason, the entire database file will be overwritten by the current |
| 998 | 998 | ** transaction. This is used by VACUUM operations. |
| 999 | 999 | ** |
| 1000 | 1000 | ** <li>[[SQLITE_FCNTL_VFSNAME]] |
| 1001 | 1001 | ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
| 1002 | -** all [VFSes] in the VFS stack. The names are of all VFS shims and the | |
| 1002 | +** all [VFSes] in the VFS stack. The names of all VFS shims and the | |
| 1003 | 1003 | ** final bottom-level VFS are written into memory obtained from |
| 1004 | 1004 | ** [sqlite3_malloc()] and the result is stored in the char* variable |
| 1005 | 1005 | ** that the fourth parameter of [sqlite3_file_control()] points to. |
| 1006 | 1006 | ** The caller is responsible for freeing the memory when done. As with |
| 1007 | 1007 | ** all file-control actions, there is no guarantee that this will actually |
| @@ -1011,11 +1011,11 @@ | ||
| 1011 | 1011 | ** |
| 1012 | 1012 | ** <li>[[SQLITE_FCNTL_VFS_POINTER]] |
| 1013 | 1013 | ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level |
| 1014 | 1014 | ** [VFSes] currently in use. ^(The argument X in |
| 1015 | 1015 | ** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be |
| 1016 | -** of type "[sqlite3_vfs] **". This opcodes will set *X | |
| 1016 | +** of type "[sqlite3_vfs] **". This opcode will set *X | |
| 1017 | 1017 | ** to a pointer to the top-level VFS.)^ |
| 1018 | 1018 | ** ^When there are multiple VFS shims in the stack, this opcode finds the |
| 1019 | 1019 | ** upper-most shim only. |
| 1020 | 1020 | ** |
| 1021 | 1021 | ** <li>[[SQLITE_FCNTL_PRAGMA]] |
| @@ -1201,11 +1201,11 @@ | ||
| 1201 | 1201 | ** record the fact that the pages have been checkpointed. |
| 1202 | 1202 | ** |
| 1203 | 1203 | ** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
| 1204 | 1204 | ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
| 1205 | 1205 | ** whether or not there is a database client in another process with a wal-mode |
| 1206 | -** transaction open on the database or not. It is only available on unix.The | |
| 1206 | +** transaction open on the database or not. It is only available on unix. The | |
| 1207 | 1207 | ** (void*) argument passed with this file-control should be a pointer to a |
| 1208 | 1208 | ** value of type (int). The integer value is set to 1 if the database is a wal |
| 1209 | 1209 | ** mode database and there exists at least one client in another process that |
| 1210 | 1210 | ** currently has an SQL transaction open on the database. It is set to 0 if |
| 1211 | 1211 | ** the database is not a wal-mode db, or if there is no such connection in any |
| @@ -1626,11 +1626,11 @@ | ||
| 1626 | 1626 | ** |
| 1627 | 1627 | ** ^The sqlite3_initialize() routine is called internally by many other |
| 1628 | 1628 | ** SQLite interfaces so that an application usually does not need to |
| 1629 | 1629 | ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] |
| 1630 | 1630 | ** calls sqlite3_initialize() so the SQLite library will be automatically |
| 1631 | -** initialized when [sqlite3_open()] is called if it has not be initialized | |
| 1631 | +** initialized when [sqlite3_open()] is called if it has not been initialized | |
| 1632 | 1632 | ** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] |
| 1633 | 1633 | ** compile-time option, then the automatic calls to sqlite3_initialize() |
| 1634 | 1634 | ** are omitted and the application must call sqlite3_initialize() directly |
| 1635 | 1635 | ** prior to using any other SQLite interface. For maximum portability, |
| 1636 | 1636 | ** it is recommended that applications always invoke sqlite3_initialize() |
| @@ -1883,25 +1883,25 @@ | ||
| 1883 | 1883 | ** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which |
| 1884 | 1884 | ** is a pointer to an instance of the [sqlite3_mem_methods] structure. |
| 1885 | 1885 | ** The [sqlite3_mem_methods] |
| 1886 | 1886 | ** structure is filled with the currently defined memory allocation routines.)^ |
| 1887 | 1887 | ** This option can be used to overload the default memory allocation |
| 1888 | -** routines with a wrapper that simulations memory allocation failure or | |
| 1888 | +** routines with a wrapper that simulates memory allocation failure or | |
| 1889 | 1889 | ** tracks memory usage, for example. </dd> |
| 1890 | 1890 | ** |
| 1891 | 1891 | ** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt> |
| 1892 | -** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes single argument of | |
| 1892 | +** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of | |
| 1893 | 1893 | ** type int, interpreted as a boolean, which if true provides a hint to |
| 1894 | 1894 | ** SQLite that it should avoid large memory allocations if possible. |
| 1895 | 1895 | ** SQLite will run faster if it is free to make large memory allocations, |
| 1896 | -** but some application might prefer to run slower in exchange for | |
| 1896 | +** but some applications might prefer to run slower in exchange for | |
| 1897 | 1897 | ** guarantees about memory fragmentation that are possible if large |
| 1898 | 1898 | ** allocations are avoided. This hint is normally off. |
| 1899 | 1899 | ** </dd> |
| 1900 | 1900 | ** |
| 1901 | 1901 | ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> |
| 1902 | -** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int, | |
| 1902 | +** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type int, | |
| 1903 | 1903 | ** interpreted as a boolean, which enables or disables the collection of |
| 1904 | 1904 | ** memory allocation statistics. ^(When memory allocation statistics are |
| 1905 | 1905 | ** disabled, the following SQLite interfaces become non-operational: |
| 1906 | 1906 | ** <ul> |
| 1907 | 1907 | ** <li> [sqlite3_hard_heap_limit64()] |
| @@ -1942,11 +1942,11 @@ | ||
| 1942 | 1942 | ** a page cache line is larger than sz bytes or if all of the pMem buffer |
| 1943 | 1943 | ** is exhausted. |
| 1944 | 1944 | ** ^If pMem is NULL and N is non-zero, then each database connection |
| 1945 | 1945 | ** does an initial bulk allocation for page cache memory |
| 1946 | 1946 | ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or |
| 1947 | -** of -1024*N bytes if N is negative, . ^If additional | |
| 1947 | +** of -1024*N bytes if N is negative. ^If additional | |
| 1948 | 1948 | ** page cache memory is needed beyond what is provided by the initial |
| 1949 | 1949 | ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each |
| 1950 | 1950 | ** additional cache line. </dd> |
| 1951 | 1951 | ** |
| 1952 | 1952 | ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> |
| @@ -1971,11 +1971,11 @@ | ||
| 1971 | 1971 | ** |
| 1972 | 1972 | ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> |
| 1973 | 1973 | ** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a |
| 1974 | 1974 | ** pointer to an instance of the [sqlite3_mutex_methods] structure. |
| 1975 | 1975 | ** The argument specifies alternative low-level mutex routines to be used |
| 1976 | -** in place the mutex routines built into SQLite.)^ ^SQLite makes a copy of | |
| 1976 | +** in place of the mutex routines built into SQLite.)^ ^SQLite makes a copy of | |
| 1977 | 1977 | ** the content of the [sqlite3_mutex_methods] structure before the call to |
| 1978 | 1978 | ** [sqlite3_config()] returns. ^If SQLite is compiled with |
| 1979 | 1979 | ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then |
| 1980 | 1980 | ** the entire mutexing subsystem is omitted from the build and hence calls to |
| 1981 | 1981 | ** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will |
| @@ -2013,11 +2013,11 @@ | ||
| 2013 | 2013 | ** the interface to a custom page cache implementation.)^ |
| 2014 | 2014 | ** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> |
| 2015 | 2015 | ** |
| 2016 | 2016 | ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> |
| 2017 | 2017 | ** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which |
| 2018 | -** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies of | |
| 2018 | +** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies off | |
| 2019 | 2019 | ** the current page cache implementation into that object.)^ </dd> |
| 2020 | 2020 | ** |
| 2021 | 2021 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 2022 | 2022 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 2023 | 2023 | ** global [error log]. |
| @@ -2030,11 +2030,11 @@ | ||
| 2030 | 2030 | ** passed through as the first parameter to the application-defined logger |
| 2031 | 2031 | ** function whenever that function is invoked. ^The second parameter to |
| 2032 | 2032 | ** the logger function is a copy of the first parameter to the corresponding |
| 2033 | 2033 | ** [sqlite3_log()] call and is intended to be a [result code] or an |
| 2034 | 2034 | ** [extended result code]. ^The third parameter passed to the logger is |
| 2035 | -** log message after formatting via [sqlite3_snprintf()]. | |
| 2035 | +** a log message after formatting via [sqlite3_snprintf()]. | |
| 2036 | 2036 | ** The SQLite logging interface is not reentrant; the logger function |
| 2037 | 2037 | ** supplied by the application must not invoke any SQLite interface. |
| 2038 | 2038 | ** In a multi-threaded application, the application-defined logger |
| 2039 | 2039 | ** function must be threadsafe. </dd> |
| 2040 | 2040 | ** |
| @@ -2221,11 +2221,11 @@ | ||
| 2221 | 2221 | ** CAPI3REF: Database Connection Configuration Options |
| 2222 | 2222 | ** |
| 2223 | 2223 | ** These constants are the available integer configuration options that |
| 2224 | 2224 | ** can be passed as the second parameter to the [sqlite3_db_config()] interface. |
| 2225 | 2225 | ** |
| 2226 | -** The [sqlite3_db_config()] interface is a var-args functions. It takes a | |
| 2226 | +** The [sqlite3_db_config()] interface is a var-args function. It takes a | |
| 2227 | 2227 | ** variable number of parameters, though always at least two. The number of |
| 2228 | 2228 | ** parameters passed into sqlite3_db_config() depends on which of these |
| 2229 | 2229 | ** constants is given as the second parameter. This documentation page |
| 2230 | 2230 | ** refers to parameters beyond the second as "arguments". Thus, when this |
| 2231 | 2231 | ** page says "the N-th argument" it means "the N-th parameter past the |
| @@ -2355,12 +2355,12 @@ | ||
| 2355 | 2355 | ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 2356 | 2356 | ** There must be two additional arguments. |
| 2357 | 2357 | ** When the first argument to this interface is 1, then only the C-API is |
| 2358 | 2358 | ** enabled and the SQL function remains disabled. If the first argument to |
| 2359 | 2359 | ** this interface is 0, then both the C-API and the SQL function are disabled. |
| 2360 | -** If the first argument is -1, then no changes are made to state of either the | |
| 2361 | -** C-API or the SQL function. | |
| 2360 | +** If the first argument is -1, then no changes are made to the state of either | |
| 2361 | +** the C-API or the SQL function. | |
| 2362 | 2362 | ** The second parameter is a pointer to an integer into which |
| 2363 | 2363 | ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface |
| 2364 | 2364 | ** is disabled or enabled following this call. The second parameter may |
| 2365 | 2365 | ** be a NULL pointer, in which case the new setting is not reported back. |
| 2366 | 2366 | ** </dd> |
| @@ -2474,11 +2474,11 @@ | ||
| 2474 | 2474 | ** </dd> |
| 2475 | 2475 | ** |
| 2476 | 2476 | ** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]] |
| 2477 | 2477 | ** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt> |
| 2478 | 2478 | ** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates |
| 2479 | -** the legacy behavior of the [ALTER TABLE RENAME] command such it | |
| 2479 | +** the legacy behavior of the [ALTER TABLE RENAME] command such that it | |
| 2480 | 2480 | ** behaves as it did prior to [version 3.24.0] (2018-06-04). See the |
| 2481 | 2481 | ** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for |
| 2482 | 2482 | ** additional information. This feature can also be turned on and off |
| 2483 | 2483 | ** using the [PRAGMA legacy_alter_table] statement. |
| 2484 | 2484 | ** </dd> |
| @@ -2523,11 +2523,11 @@ | ||
| 2523 | 2523 | ** |
| 2524 | 2524 | ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
| 2525 | 2525 | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
| 2526 | 2526 | ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
| 2527 | 2527 | ** the legacy file format flag. When activated, this flag causes all newly |
| 2528 | -** created database file to have a schema format version number (the 4-byte | |
| 2528 | +** created database files to have a schema format version number (the 4-byte | |
| 2529 | 2529 | ** integer found at offset 44 into the database header) of 1. This in turn |
| 2530 | 2530 | ** means that the resulting database file will be readable and writable by |
| 2531 | 2531 | ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
| 2532 | 2532 | ** newly created databases are generally not understandable by SQLite versions |
| 2533 | 2533 | ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
| @@ -2550,11 +2550,11 @@ | ||
| 2550 | 2550 | ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
| 2551 | 2551 | ** statistics. For statistics to be collected, the flag must be set on |
| 2552 | 2552 | ** the database handle both when the SQL statement is prepared and when it |
| 2553 | 2553 | ** is stepped. The flag is set (collection of statistics is enabled) |
| 2554 | 2554 | ** by default. <p>This option takes two arguments: an integer and a pointer to |
| 2555 | -** an integer.. The first argument is 1, 0, or -1 to enable, disable, or | |
| 2555 | +** an integer. The first argument is 1, 0, or -1 to enable, disable, or | |
| 2556 | 2556 | ** leave unchanged the statement scanstatus option. If the second argument |
| 2557 | 2557 | ** is not NULL, then the value of the statement scanstatus setting after |
| 2558 | 2558 | ** processing the first argument is written into the integer that the second |
| 2559 | 2559 | ** argument points to. |
| 2560 | 2560 | ** </dd> |
| @@ -2593,12 +2593,12 @@ | ||
| 2593 | 2593 | ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]] |
| 2594 | 2594 | ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt> |
| 2595 | 2595 | ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the |
| 2596 | 2596 | ** ability of the [ATTACH DATABASE] SQL command to open a database for writing. |
| 2597 | 2597 | ** This capability is enabled by default. Applications can disable or |
| 2598 | -** reenable this capability using the current DBCONFIG option. If the | |
| 2599 | -** the this capability is disabled, the [ATTACH] command will still work, | |
| 2598 | +** reenable this capability using the current DBCONFIG option. If | |
| 2599 | +** this capability is disabled, the [ATTACH] command will still work, | |
| 2600 | 2600 | ** but the database will be opened read-only. If this option is disabled, |
| 2601 | 2601 | ** then the ability to create a new database using [ATTACH] is also disabled, |
| 2602 | 2602 | ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE] |
| 2603 | 2603 | ** option.<p> |
| 2604 | 2604 | ** This option takes two arguments which are an integer and a pointer |
| @@ -2628,11 +2628,11 @@ | ||
| 2628 | 2628 | ** |
| 2629 | 2629 | ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3> |
| 2630 | 2630 | ** |
| 2631 | 2631 | ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the |
| 2632 | 2632 | ** overall call to [sqlite3_db_config()] has a total of four parameters. |
| 2633 | -** The first argument (the third parameter to sqlite3_db_config()) is a integer. | |
| 2633 | +** The first argument (the third parameter to sqlite3_db_config()) is an integer. | |
| 2634 | 2634 | ** The second argument is a pointer to an integer. If the first argument is 1, |
| 2635 | 2635 | ** then the option becomes enabled. If the first integer argument is 0, then the |
| 2636 | 2636 | ** option is disabled. If the first argument is -1, then the option setting |
| 2637 | 2637 | ** is unchanged. The second argument, the pointer to an integer, may be NULL. |
| 2638 | 2638 | ** If the second argument is not NULL, then a value of 0 or 1 is written into |
| @@ -2918,11 +2918,11 @@ | ||
| 2918 | 2918 | ** and comments that follow the final semicolon are ignored. |
| 2919 | 2919 | ** |
| 2920 | 2920 | ** ^These routines return 0 if the statement is incomplete. ^If a |
| 2921 | 2921 | ** memory allocation fails, then SQLITE_NOMEM is returned. |
| 2922 | 2922 | ** |
| 2923 | -** ^These routines do not parse the SQL statements thus | |
| 2923 | +** ^These routines do not parse the SQL statements and thus | |
| 2924 | 2924 | ** will not detect syntactically incorrect SQL. |
| 2925 | 2925 | ** |
| 2926 | 2926 | ** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior |
| 2927 | 2927 | ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked |
| 2928 | 2928 | ** automatically by sqlite3_complete16(). If that initialization fails, |
| @@ -3035,11 +3035,11 @@ | ||
| 3035 | 3035 | ** Passing 0 to this function disables blocking locks altogether. Passing |
| 3036 | 3036 | ** -1 to this function requests that the VFS blocks for a long time - |
| 3037 | 3037 | ** indefinitely if possible. The results of passing any other negative value |
| 3038 | 3038 | ** are undefined. |
| 3039 | 3039 | ** |
| 3040 | -** Internally, each SQLite database handle store two timeout values - the | |
| 3040 | +** Internally, each SQLite database handle stores two timeout values - the | |
| 3041 | 3041 | ** busy-timeout (used for rollback mode databases, or if the VFS does not |
| 3042 | 3042 | ** support blocking locks) and the setlk-timeout (used for blocking locks |
| 3043 | 3043 | ** on wal-mode databases). The sqlite3_busy_timeout() method sets both |
| 3044 | 3044 | ** values, this function sets only the setlk-timeout value. Therefore, |
| 3045 | 3045 | ** to configure separate busy-timeout and setlk-timeout values for a single |
| @@ -3065,11 +3065,11 @@ | ||
| 3065 | 3065 | ** METHOD: sqlite3 |
| 3066 | 3066 | ** |
| 3067 | 3067 | ** This is a legacy interface that is preserved for backwards compatibility. |
| 3068 | 3068 | ** Use of this interface is not recommended. |
| 3069 | 3069 | ** |
| 3070 | -** Definition: A <b>result table</b> is memory data structure created by the | |
| 3070 | +** Definition: A <b>result table</b> is a memory data structure created by the | |
| 3071 | 3071 | ** [sqlite3_get_table()] interface. A result table records the |
| 3072 | 3072 | ** complete query results from one or more queries. |
| 3073 | 3073 | ** |
| 3074 | 3074 | ** The table conceptually has a number of rows and columns. But |
| 3075 | 3075 | ** these numbers are not part of the result table itself. These |
| @@ -3208,11 +3208,11 @@ | ||
| 3208 | 3208 | ** of a signed 32-bit integer. |
| 3209 | 3209 | ** |
| 3210 | 3210 | ** ^Calling sqlite3_free() with a pointer previously returned |
| 3211 | 3211 | ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so |
| 3212 | 3212 | ** that it might be reused. ^The sqlite3_free() routine is |
| 3213 | -** a no-op if is called with a NULL pointer. Passing a NULL pointer | |
| 3213 | +** a no-op if it is called with a NULL pointer. Passing a NULL pointer | |
| 3214 | 3214 | ** to sqlite3_free() is harmless. After being freed, memory |
| 3215 | 3215 | ** should neither be read nor written. Even reading previously freed |
| 3216 | 3216 | ** memory might result in a segmentation fault or other severe error. |
| 3217 | 3217 | ** Memory corruption, a segmentation fault, or other severe error |
| 3218 | 3218 | ** might result if sqlite3_free() is called with a non-NULL pointer that |
| @@ -3226,17 +3226,17 @@ | ||
| 3226 | 3226 | ** ^If the N parameter to sqlite3_realloc(X,N) is zero or |
| 3227 | 3227 | ** negative then the behavior is exactly the same as calling |
| 3228 | 3228 | ** sqlite3_free(X). |
| 3229 | 3229 | ** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation |
| 3230 | 3230 | ** of at least N bytes in size or NULL if insufficient memory is available. |
| 3231 | -** ^If M is the size of the prior allocation, then min(N,M) bytes | |
| 3232 | -** of the prior allocation are copied into the beginning of buffer returned | |
| 3231 | +** ^If M is the size of the prior allocation, then min(N,M) bytes of the | |
| 3232 | +** prior allocation are copied into the beginning of the buffer returned | |
| 3233 | 3233 | ** by sqlite3_realloc(X,N) and the prior allocation is freed. |
| 3234 | 3234 | ** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the |
| 3235 | 3235 | ** prior allocation is not freed. |
| 3236 | 3236 | ** |
| 3237 | -** ^The sqlite3_realloc64(X,N) interfaces works the same as | |
| 3237 | +** ^The sqlite3_realloc64(X,N) interface works the same as | |
| 3238 | 3238 | ** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead |
| 3239 | 3239 | ** of a 32-bit signed integer. |
| 3240 | 3240 | ** |
| 3241 | 3241 | ** ^If X is a memory allocation previously obtained from sqlite3_malloc(), |
| 3242 | 3242 | ** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then |
| @@ -3282,11 +3282,11 @@ | ||
| 3282 | 3282 | ** ^The [sqlite3_memory_highwater()] routine returns the maximum |
| 3283 | 3283 | ** value of [sqlite3_memory_used()] since the high-water mark |
| 3284 | 3284 | ** was last reset. ^The values returned by [sqlite3_memory_used()] and |
| 3285 | 3285 | ** [sqlite3_memory_highwater()] include any overhead |
| 3286 | 3286 | ** added by SQLite in its implementation of [sqlite3_malloc()], |
| 3287 | -** but not overhead added by the any underlying system library | |
| 3287 | +** but not overhead added by any underlying system library | |
| 3288 | 3288 | ** routines that [sqlite3_malloc()] may call. |
| 3289 | 3289 | ** |
| 3290 | 3290 | ** ^The memory high-water mark is reset to the current value of |
| 3291 | 3291 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 3292 | 3292 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| @@ -3734,19 +3734,19 @@ | ||
| 3734 | 3734 | ** attempt to use the same database connection at the same time. |
| 3735 | 3735 | ** (Mutexes will block any actual concurrency, but in this mode |
| 3736 | 3736 | ** there is no harm in trying.) |
| 3737 | 3737 | ** |
| 3738 | 3738 | ** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt> |
| 3739 | -** <dd>The database is opened [shared cache] enabled, overriding | |
| 3739 | +** <dd>The database is opened with [shared cache] enabled, overriding | |
| 3740 | 3740 | ** the default shared cache setting provided by |
| 3741 | 3741 | ** [sqlite3_enable_shared_cache()].)^ |
| 3742 | 3742 | ** The [use of shared cache mode is discouraged] and hence shared cache |
| 3743 | 3743 | ** capabilities may be omitted from many builds of SQLite. In such cases, |
| 3744 | 3744 | ** this option is a no-op. |
| 3745 | 3745 | ** |
| 3746 | 3746 | ** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
| 3747 | -** <dd>The database is opened [shared cache] disabled, overriding | |
| 3747 | +** <dd>The database is opened with [shared cache] disabled, overriding | |
| 3748 | 3748 | ** the default shared cache setting provided by |
| 3749 | 3749 | ** [sqlite3_enable_shared_cache()].)^ |
| 3750 | 3750 | ** |
| 3751 | 3751 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3752 | 3752 | ** <dd>The database connection comes up in "extended result code mode". |
| 3753 | 3753 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | #define SQLITE_SOURCE_ID "2025-06-19 20:19:12 a88bb75288a06492a04ab1278e8a2101a74f4ba712d328b4c73e86ac01cb946d" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| @@ -166,13 +166,13 @@ | |
| 166 | ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); |
| 167 | ** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); |
| 168 | ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
| 169 | ** </pre></blockquote>)^ |
| 170 | ** |
| 171 | ** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] |
| 172 | ** macro. ^The sqlite3_libversion() function returns a pointer to the |
| 173 | ** to the sqlite3_version[] string constant. The sqlite3_libversion() |
| 174 | ** function is provided for use in DLLs since DLL users usually do not have |
| 175 | ** direct access to string constants within the DLL. ^The |
| 176 | ** sqlite3_libversion_number() function returns an integer equal to |
| 177 | ** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns |
| 178 | ** a pointer to a string constant whose value is the same as the |
| @@ -368,11 +368,11 @@ | |
| 368 | ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], |
| 369 | ** that allows an application to run multiple statements of SQL |
| 370 | ** without having to use a lot of C code. |
| 371 | ** |
| 372 | ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, |
| 373 | ** semicolon-separate SQL statements passed into its 2nd argument, |
| 374 | ** in the context of the [database connection] passed in as its 1st |
| 375 | ** argument. ^If the callback function of the 3rd argument to |
| 376 | ** sqlite3_exec() is not NULL, then it is invoked for each result row |
| 377 | ** coming out of the evaluated SQL statements. ^The 4th argument to |
| 378 | ** sqlite3_exec() is relayed through to the 1st argument of each |
| @@ -401,11 +401,11 @@ | |
| 401 | ** callback is an array of pointers to strings obtained as if from |
| 402 | ** [sqlite3_column_text()], one for each column. ^If an element of a |
| 403 | ** result row is NULL then the corresponding string pointer for the |
| 404 | ** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the |
| 405 | ** sqlite3_exec() callback is an array of pointers to strings where each |
| 406 | ** entry represents the name of corresponding result column as obtained |
| 407 | ** from [sqlite3_column_name()]. |
| 408 | ** |
| 409 | ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer |
| 410 | ** to an empty string, or a pointer that contains only whitespace and/or |
| 411 | ** SQL comments, then no SQL statements are evaluated and the database |
| @@ -587,11 +587,11 @@ | |
| 587 | ** Applications should not depend on the historical behavior. |
| 588 | ** |
| 589 | ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
| 590 | ** [sqlite3_open_v2()] does *not* cause the underlying database file |
| 591 | ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
| 592 | ** [sqlite3_open_v2()] has historically be a no-op and might become an |
| 593 | ** error in future versions of SQLite. |
| 594 | */ |
| 595 | #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
| 596 | #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
| 597 | #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ |
| @@ -681,11 +681,11 @@ | |
| 681 | ** CAPI3REF: File Locking Levels |
| 682 | ** |
| 683 | ** SQLite uses one of these integer values as the second |
| 684 | ** argument to calls it makes to the xLock() and xUnlock() methods |
| 685 | ** of an [sqlite3_io_methods] object. These values are ordered from |
| 686 | ** lest restrictive to most restrictive. |
| 687 | ** |
| 688 | ** The argument to xLock() is always SHARED or higher. The argument to |
| 689 | ** xUnlock is either SHARED or NONE. |
| 690 | */ |
| 691 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
| @@ -997,11 +997,11 @@ | |
| 997 | ** reason, the entire database file will be overwritten by the current |
| 998 | ** transaction. This is used by VACUUM operations. |
| 999 | ** |
| 1000 | ** <li>[[SQLITE_FCNTL_VFSNAME]] |
| 1001 | ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
| 1002 | ** all [VFSes] in the VFS stack. The names are of all VFS shims and the |
| 1003 | ** final bottom-level VFS are written into memory obtained from |
| 1004 | ** [sqlite3_malloc()] and the result is stored in the char* variable |
| 1005 | ** that the fourth parameter of [sqlite3_file_control()] points to. |
| 1006 | ** The caller is responsible for freeing the memory when done. As with |
| 1007 | ** all file-control actions, there is no guarantee that this will actually |
| @@ -1011,11 +1011,11 @@ | |
| 1011 | ** |
| 1012 | ** <li>[[SQLITE_FCNTL_VFS_POINTER]] |
| 1013 | ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level |
| 1014 | ** [VFSes] currently in use. ^(The argument X in |
| 1015 | ** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be |
| 1016 | ** of type "[sqlite3_vfs] **". This opcodes will set *X |
| 1017 | ** to a pointer to the top-level VFS.)^ |
| 1018 | ** ^When there are multiple VFS shims in the stack, this opcode finds the |
| 1019 | ** upper-most shim only. |
| 1020 | ** |
| 1021 | ** <li>[[SQLITE_FCNTL_PRAGMA]] |
| @@ -1201,11 +1201,11 @@ | |
| 1201 | ** record the fact that the pages have been checkpointed. |
| 1202 | ** |
| 1203 | ** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
| 1204 | ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
| 1205 | ** whether or not there is a database client in another process with a wal-mode |
| 1206 | ** transaction open on the database or not. It is only available on unix.The |
| 1207 | ** (void*) argument passed with this file-control should be a pointer to a |
| 1208 | ** value of type (int). The integer value is set to 1 if the database is a wal |
| 1209 | ** mode database and there exists at least one client in another process that |
| 1210 | ** currently has an SQL transaction open on the database. It is set to 0 if |
| 1211 | ** the database is not a wal-mode db, or if there is no such connection in any |
| @@ -1626,11 +1626,11 @@ | |
| 1626 | ** |
| 1627 | ** ^The sqlite3_initialize() routine is called internally by many other |
| 1628 | ** SQLite interfaces so that an application usually does not need to |
| 1629 | ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] |
| 1630 | ** calls sqlite3_initialize() so the SQLite library will be automatically |
| 1631 | ** initialized when [sqlite3_open()] is called if it has not be initialized |
| 1632 | ** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] |
| 1633 | ** compile-time option, then the automatic calls to sqlite3_initialize() |
| 1634 | ** are omitted and the application must call sqlite3_initialize() directly |
| 1635 | ** prior to using any other SQLite interface. For maximum portability, |
| 1636 | ** it is recommended that applications always invoke sqlite3_initialize() |
| @@ -1883,25 +1883,25 @@ | |
| 1883 | ** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which |
| 1884 | ** is a pointer to an instance of the [sqlite3_mem_methods] structure. |
| 1885 | ** The [sqlite3_mem_methods] |
| 1886 | ** structure is filled with the currently defined memory allocation routines.)^ |
| 1887 | ** This option can be used to overload the default memory allocation |
| 1888 | ** routines with a wrapper that simulations memory allocation failure or |
| 1889 | ** tracks memory usage, for example. </dd> |
| 1890 | ** |
| 1891 | ** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt> |
| 1892 | ** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes single argument of |
| 1893 | ** type int, interpreted as a boolean, which if true provides a hint to |
| 1894 | ** SQLite that it should avoid large memory allocations if possible. |
| 1895 | ** SQLite will run faster if it is free to make large memory allocations, |
| 1896 | ** but some application might prefer to run slower in exchange for |
| 1897 | ** guarantees about memory fragmentation that are possible if large |
| 1898 | ** allocations are avoided. This hint is normally off. |
| 1899 | ** </dd> |
| 1900 | ** |
| 1901 | ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> |
| 1902 | ** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int, |
| 1903 | ** interpreted as a boolean, which enables or disables the collection of |
| 1904 | ** memory allocation statistics. ^(When memory allocation statistics are |
| 1905 | ** disabled, the following SQLite interfaces become non-operational: |
| 1906 | ** <ul> |
| 1907 | ** <li> [sqlite3_hard_heap_limit64()] |
| @@ -1942,11 +1942,11 @@ | |
| 1942 | ** a page cache line is larger than sz bytes or if all of the pMem buffer |
| 1943 | ** is exhausted. |
| 1944 | ** ^If pMem is NULL and N is non-zero, then each database connection |
| 1945 | ** does an initial bulk allocation for page cache memory |
| 1946 | ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or |
| 1947 | ** of -1024*N bytes if N is negative, . ^If additional |
| 1948 | ** page cache memory is needed beyond what is provided by the initial |
| 1949 | ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each |
| 1950 | ** additional cache line. </dd> |
| 1951 | ** |
| 1952 | ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> |
| @@ -1971,11 +1971,11 @@ | |
| 1971 | ** |
| 1972 | ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> |
| 1973 | ** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a |
| 1974 | ** pointer to an instance of the [sqlite3_mutex_methods] structure. |
| 1975 | ** The argument specifies alternative low-level mutex routines to be used |
| 1976 | ** in place the mutex routines built into SQLite.)^ ^SQLite makes a copy of |
| 1977 | ** the content of the [sqlite3_mutex_methods] structure before the call to |
| 1978 | ** [sqlite3_config()] returns. ^If SQLite is compiled with |
| 1979 | ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then |
| 1980 | ** the entire mutexing subsystem is omitted from the build and hence calls to |
| 1981 | ** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will |
| @@ -2013,11 +2013,11 @@ | |
| 2013 | ** the interface to a custom page cache implementation.)^ |
| 2014 | ** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> |
| 2015 | ** |
| 2016 | ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> |
| 2017 | ** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which |
| 2018 | ** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies of |
| 2019 | ** the current page cache implementation into that object.)^ </dd> |
| 2020 | ** |
| 2021 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 2022 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 2023 | ** global [error log]. |
| @@ -2030,11 +2030,11 @@ | |
| 2030 | ** passed through as the first parameter to the application-defined logger |
| 2031 | ** function whenever that function is invoked. ^The second parameter to |
| 2032 | ** the logger function is a copy of the first parameter to the corresponding |
| 2033 | ** [sqlite3_log()] call and is intended to be a [result code] or an |
| 2034 | ** [extended result code]. ^The third parameter passed to the logger is |
| 2035 | ** log message after formatting via [sqlite3_snprintf()]. |
| 2036 | ** The SQLite logging interface is not reentrant; the logger function |
| 2037 | ** supplied by the application must not invoke any SQLite interface. |
| 2038 | ** In a multi-threaded application, the application-defined logger |
| 2039 | ** function must be threadsafe. </dd> |
| 2040 | ** |
| @@ -2221,11 +2221,11 @@ | |
| 2221 | ** CAPI3REF: Database Connection Configuration Options |
| 2222 | ** |
| 2223 | ** These constants are the available integer configuration options that |
| 2224 | ** can be passed as the second parameter to the [sqlite3_db_config()] interface. |
| 2225 | ** |
| 2226 | ** The [sqlite3_db_config()] interface is a var-args functions. It takes a |
| 2227 | ** variable number of parameters, though always at least two. The number of |
| 2228 | ** parameters passed into sqlite3_db_config() depends on which of these |
| 2229 | ** constants is given as the second parameter. This documentation page |
| 2230 | ** refers to parameters beyond the second as "arguments". Thus, when this |
| 2231 | ** page says "the N-th argument" it means "the N-th parameter past the |
| @@ -2355,12 +2355,12 @@ | |
| 2355 | ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 2356 | ** There must be two additional arguments. |
| 2357 | ** When the first argument to this interface is 1, then only the C-API is |
| 2358 | ** enabled and the SQL function remains disabled. If the first argument to |
| 2359 | ** this interface is 0, then both the C-API and the SQL function are disabled. |
| 2360 | ** If the first argument is -1, then no changes are made to state of either the |
| 2361 | ** C-API or the SQL function. |
| 2362 | ** The second parameter is a pointer to an integer into which |
| 2363 | ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface |
| 2364 | ** is disabled or enabled following this call. The second parameter may |
| 2365 | ** be a NULL pointer, in which case the new setting is not reported back. |
| 2366 | ** </dd> |
| @@ -2474,11 +2474,11 @@ | |
| 2474 | ** </dd> |
| 2475 | ** |
| 2476 | ** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]] |
| 2477 | ** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt> |
| 2478 | ** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates |
| 2479 | ** the legacy behavior of the [ALTER TABLE RENAME] command such it |
| 2480 | ** behaves as it did prior to [version 3.24.0] (2018-06-04). See the |
| 2481 | ** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for |
| 2482 | ** additional information. This feature can also be turned on and off |
| 2483 | ** using the [PRAGMA legacy_alter_table] statement. |
| 2484 | ** </dd> |
| @@ -2523,11 +2523,11 @@ | |
| 2523 | ** |
| 2524 | ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
| 2525 | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
| 2526 | ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
| 2527 | ** the legacy file format flag. When activated, this flag causes all newly |
| 2528 | ** created database file to have a schema format version number (the 4-byte |
| 2529 | ** integer found at offset 44 into the database header) of 1. This in turn |
| 2530 | ** means that the resulting database file will be readable and writable by |
| 2531 | ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
| 2532 | ** newly created databases are generally not understandable by SQLite versions |
| 2533 | ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
| @@ -2550,11 +2550,11 @@ | |
| 2550 | ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
| 2551 | ** statistics. For statistics to be collected, the flag must be set on |
| 2552 | ** the database handle both when the SQL statement is prepared and when it |
| 2553 | ** is stepped. The flag is set (collection of statistics is enabled) |
| 2554 | ** by default. <p>This option takes two arguments: an integer and a pointer to |
| 2555 | ** an integer.. The first argument is 1, 0, or -1 to enable, disable, or |
| 2556 | ** leave unchanged the statement scanstatus option. If the second argument |
| 2557 | ** is not NULL, then the value of the statement scanstatus setting after |
| 2558 | ** processing the first argument is written into the integer that the second |
| 2559 | ** argument points to. |
| 2560 | ** </dd> |
| @@ -2593,12 +2593,12 @@ | |
| 2593 | ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]] |
| 2594 | ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt> |
| 2595 | ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the |
| 2596 | ** ability of the [ATTACH DATABASE] SQL command to open a database for writing. |
| 2597 | ** This capability is enabled by default. Applications can disable or |
| 2598 | ** reenable this capability using the current DBCONFIG option. If the |
| 2599 | ** the this capability is disabled, the [ATTACH] command will still work, |
| 2600 | ** but the database will be opened read-only. If this option is disabled, |
| 2601 | ** then the ability to create a new database using [ATTACH] is also disabled, |
| 2602 | ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE] |
| 2603 | ** option.<p> |
| 2604 | ** This option takes two arguments which are an integer and a pointer |
| @@ -2628,11 +2628,11 @@ | |
| 2628 | ** |
| 2629 | ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3> |
| 2630 | ** |
| 2631 | ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the |
| 2632 | ** overall call to [sqlite3_db_config()] has a total of four parameters. |
| 2633 | ** The first argument (the third parameter to sqlite3_db_config()) is a integer. |
| 2634 | ** The second argument is a pointer to an integer. If the first argument is 1, |
| 2635 | ** then the option becomes enabled. If the first integer argument is 0, then the |
| 2636 | ** option is disabled. If the first argument is -1, then the option setting |
| 2637 | ** is unchanged. The second argument, the pointer to an integer, may be NULL. |
| 2638 | ** If the second argument is not NULL, then a value of 0 or 1 is written into |
| @@ -2918,11 +2918,11 @@ | |
| 2918 | ** and comments that follow the final semicolon are ignored. |
| 2919 | ** |
| 2920 | ** ^These routines return 0 if the statement is incomplete. ^If a |
| 2921 | ** memory allocation fails, then SQLITE_NOMEM is returned. |
| 2922 | ** |
| 2923 | ** ^These routines do not parse the SQL statements thus |
| 2924 | ** will not detect syntactically incorrect SQL. |
| 2925 | ** |
| 2926 | ** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior |
| 2927 | ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked |
| 2928 | ** automatically by sqlite3_complete16(). If that initialization fails, |
| @@ -3035,11 +3035,11 @@ | |
| 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 |
| @@ -3065,11 +3065,11 @@ | |
| 3065 | ** METHOD: sqlite3 |
| 3066 | ** |
| 3067 | ** This is a legacy interface that is preserved for backwards compatibility. |
| 3068 | ** Use of this interface is not recommended. |
| 3069 | ** |
| 3070 | ** Definition: A <b>result table</b> is memory data structure created by the |
| 3071 | ** [sqlite3_get_table()] interface. A result table records the |
| 3072 | ** complete query results from one or more queries. |
| 3073 | ** |
| 3074 | ** The table conceptually has a number of rows and columns. But |
| 3075 | ** these numbers are not part of the result table itself. These |
| @@ -3208,11 +3208,11 @@ | |
| 3208 | ** of a signed 32-bit integer. |
| 3209 | ** |
| 3210 | ** ^Calling sqlite3_free() with a pointer previously returned |
| 3211 | ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so |
| 3212 | ** that it might be reused. ^The sqlite3_free() routine is |
| 3213 | ** a no-op if is called with a NULL pointer. Passing a NULL pointer |
| 3214 | ** to sqlite3_free() is harmless. After being freed, memory |
| 3215 | ** should neither be read nor written. Even reading previously freed |
| 3216 | ** memory might result in a segmentation fault or other severe error. |
| 3217 | ** Memory corruption, a segmentation fault, or other severe error |
| 3218 | ** might result if sqlite3_free() is called with a non-NULL pointer that |
| @@ -3226,17 +3226,17 @@ | |
| 3226 | ** ^If the N parameter to sqlite3_realloc(X,N) is zero or |
| 3227 | ** negative then the behavior is exactly the same as calling |
| 3228 | ** sqlite3_free(X). |
| 3229 | ** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation |
| 3230 | ** of at least N bytes in size or NULL if insufficient memory is available. |
| 3231 | ** ^If M is the size of the prior allocation, then min(N,M) bytes |
| 3232 | ** of the prior allocation are copied into the beginning of buffer returned |
| 3233 | ** by sqlite3_realloc(X,N) and the prior allocation is freed. |
| 3234 | ** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the |
| 3235 | ** prior allocation is not freed. |
| 3236 | ** |
| 3237 | ** ^The sqlite3_realloc64(X,N) interfaces works the same as |
| 3238 | ** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead |
| 3239 | ** of a 32-bit signed integer. |
| 3240 | ** |
| 3241 | ** ^If X is a memory allocation previously obtained from sqlite3_malloc(), |
| 3242 | ** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then |
| @@ -3282,11 +3282,11 @@ | |
| 3282 | ** ^The [sqlite3_memory_highwater()] routine returns the maximum |
| 3283 | ** value of [sqlite3_memory_used()] since the high-water mark |
| 3284 | ** was last reset. ^The values returned by [sqlite3_memory_used()] and |
| 3285 | ** [sqlite3_memory_highwater()] include any overhead |
| 3286 | ** added by SQLite in its implementation of [sqlite3_malloc()], |
| 3287 | ** but not overhead added by the any underlying system library |
| 3288 | ** routines that [sqlite3_malloc()] may call. |
| 3289 | ** |
| 3290 | ** ^The memory high-water mark is reset to the current value of |
| 3291 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 3292 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| @@ -3734,19 +3734,19 @@ | |
| 3734 | ** attempt to use the same database connection at the same time. |
| 3735 | ** (Mutexes will block any actual concurrency, but in this mode |
| 3736 | ** there is no harm in trying.) |
| 3737 | ** |
| 3738 | ** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt> |
| 3739 | ** <dd>The database is opened [shared cache] enabled, overriding |
| 3740 | ** the default shared cache setting provided by |
| 3741 | ** [sqlite3_enable_shared_cache()].)^ |
| 3742 | ** The [use of shared cache mode is discouraged] and hence shared cache |
| 3743 | ** capabilities may be omitted from many builds of SQLite. In such cases, |
| 3744 | ** this option is a no-op. |
| 3745 | ** |
| 3746 | ** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
| 3747 | ** <dd>The database is opened [shared cache] disabled, overriding |
| 3748 | ** the default shared cache setting provided by |
| 3749 | ** [sqlite3_enable_shared_cache()].)^ |
| 3750 | ** |
| 3751 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3752 | ** <dd>The database connection comes up in "extended result code mode". |
| 3753 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.51.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3051000 |
| 151 | #define SQLITE_SOURCE_ID "2025-06-23 16:51:33 cf61cd359e666c66b6bba4407a653c799f7f07e1f5ee6b837ad467029c461a6a" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| @@ -166,13 +166,13 @@ | |
| 166 | ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); |
| 167 | ** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); |
| 168 | ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); |
| 169 | ** </pre></blockquote>)^ |
| 170 | ** |
| 171 | ** ^The sqlite3_version[] string constant contains the text of the |
| 172 | ** [SQLITE_VERSION] macro. ^The sqlite3_libversion() function returns a |
| 173 | ** pointer to the sqlite3_version[] string constant. The sqlite3_libversion() |
| 174 | ** function is provided for use in DLLs since DLL users usually do not have |
| 175 | ** direct access to string constants within the DLL. ^The |
| 176 | ** sqlite3_libversion_number() function returns an integer equal to |
| 177 | ** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns |
| 178 | ** a pointer to a string constant whose value is the same as the |
| @@ -368,11 +368,11 @@ | |
| 368 | ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], |
| 369 | ** that allows an application to run multiple statements of SQL |
| 370 | ** without having to use a lot of C code. |
| 371 | ** |
| 372 | ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, |
| 373 | ** semicolon-separated SQL statements passed into its 2nd argument, |
| 374 | ** in the context of the [database connection] passed in as its 1st |
| 375 | ** argument. ^If the callback function of the 3rd argument to |
| 376 | ** sqlite3_exec() is not NULL, then it is invoked for each result row |
| 377 | ** coming out of the evaluated SQL statements. ^The 4th argument to |
| 378 | ** sqlite3_exec() is relayed through to the 1st argument of each |
| @@ -401,11 +401,11 @@ | |
| 401 | ** callback is an array of pointers to strings obtained as if from |
| 402 | ** [sqlite3_column_text()], one for each column. ^If an element of a |
| 403 | ** result row is NULL then the corresponding string pointer for the |
| 404 | ** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the |
| 405 | ** sqlite3_exec() callback is an array of pointers to strings where each |
| 406 | ** entry represents the name of a corresponding result column as obtained |
| 407 | ** from [sqlite3_column_name()]. |
| 408 | ** |
| 409 | ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer |
| 410 | ** to an empty string, or a pointer that contains only whitespace and/or |
| 411 | ** SQL comments, then no SQL statements are evaluated and the database |
| @@ -587,11 +587,11 @@ | |
| 587 | ** Applications should not depend on the historical behavior. |
| 588 | ** |
| 589 | ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into |
| 590 | ** [sqlite3_open_v2()] does *not* cause the underlying database file |
| 591 | ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into |
| 592 | ** [sqlite3_open_v2()] has historically been a no-op and might become an |
| 593 | ** error in future versions of SQLite. |
| 594 | */ |
| 595 | #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ |
| 596 | #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ |
| 597 | #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ |
| @@ -681,11 +681,11 @@ | |
| 681 | ** CAPI3REF: File Locking Levels |
| 682 | ** |
| 683 | ** SQLite uses one of these integer values as the second |
| 684 | ** argument to calls it makes to the xLock() and xUnlock() methods |
| 685 | ** of an [sqlite3_io_methods] object. These values are ordered from |
| 686 | ** least restrictive to most restrictive. |
| 687 | ** |
| 688 | ** The argument to xLock() is always SHARED or higher. The argument to |
| 689 | ** xUnlock is either SHARED or NONE. |
| 690 | */ |
| 691 | #define SQLITE_LOCK_NONE 0 /* xUnlock() only */ |
| @@ -997,11 +997,11 @@ | |
| 997 | ** reason, the entire database file will be overwritten by the current |
| 998 | ** transaction. This is used by VACUUM operations. |
| 999 | ** |
| 1000 | ** <li>[[SQLITE_FCNTL_VFSNAME]] |
| 1001 | ** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of |
| 1002 | ** all [VFSes] in the VFS stack. The names of all VFS shims and the |
| 1003 | ** final bottom-level VFS are written into memory obtained from |
| 1004 | ** [sqlite3_malloc()] and the result is stored in the char* variable |
| 1005 | ** that the fourth parameter of [sqlite3_file_control()] points to. |
| 1006 | ** The caller is responsible for freeing the memory when done. As with |
| 1007 | ** all file-control actions, there is no guarantee that this will actually |
| @@ -1011,11 +1011,11 @@ | |
| 1011 | ** |
| 1012 | ** <li>[[SQLITE_FCNTL_VFS_POINTER]] |
| 1013 | ** ^The [SQLITE_FCNTL_VFS_POINTER] opcode finds a pointer to the top-level |
| 1014 | ** [VFSes] currently in use. ^(The argument X in |
| 1015 | ** sqlite3_file_control(db,SQLITE_FCNTL_VFS_POINTER,X) must be |
| 1016 | ** of type "[sqlite3_vfs] **". This opcode will set *X |
| 1017 | ** to a pointer to the top-level VFS.)^ |
| 1018 | ** ^When there are multiple VFS shims in the stack, this opcode finds the |
| 1019 | ** upper-most shim only. |
| 1020 | ** |
| 1021 | ** <li>[[SQLITE_FCNTL_PRAGMA]] |
| @@ -1201,11 +1201,11 @@ | |
| 1201 | ** record the fact that the pages have been checkpointed. |
| 1202 | ** |
| 1203 | ** <li>[[SQLITE_FCNTL_EXTERNAL_READER]] |
| 1204 | ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect |
| 1205 | ** whether or not there is a database client in another process with a wal-mode |
| 1206 | ** transaction open on the database or not. It is only available on unix. The |
| 1207 | ** (void*) argument passed with this file-control should be a pointer to a |
| 1208 | ** value of type (int). The integer value is set to 1 if the database is a wal |
| 1209 | ** mode database and there exists at least one client in another process that |
| 1210 | ** currently has an SQL transaction open on the database. It is set to 0 if |
| 1211 | ** the database is not a wal-mode db, or if there is no such connection in any |
| @@ -1626,11 +1626,11 @@ | |
| 1626 | ** |
| 1627 | ** ^The sqlite3_initialize() routine is called internally by many other |
| 1628 | ** SQLite interfaces so that an application usually does not need to |
| 1629 | ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] |
| 1630 | ** calls sqlite3_initialize() so the SQLite library will be automatically |
| 1631 | ** initialized when [sqlite3_open()] is called if it has not been initialized |
| 1632 | ** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] |
| 1633 | ** compile-time option, then the automatic calls to sqlite3_initialize() |
| 1634 | ** are omitted and the application must call sqlite3_initialize() directly |
| 1635 | ** prior to using any other SQLite interface. For maximum portability, |
| 1636 | ** it is recommended that applications always invoke sqlite3_initialize() |
| @@ -1883,25 +1883,25 @@ | |
| 1883 | ** <dd> ^(The SQLITE_CONFIG_GETMALLOC option takes a single argument which |
| 1884 | ** is a pointer to an instance of the [sqlite3_mem_methods] structure. |
| 1885 | ** The [sqlite3_mem_methods] |
| 1886 | ** structure is filled with the currently defined memory allocation routines.)^ |
| 1887 | ** This option can be used to overload the default memory allocation |
| 1888 | ** routines with a wrapper that simulates memory allocation failure or |
| 1889 | ** tracks memory usage, for example. </dd> |
| 1890 | ** |
| 1891 | ** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt> |
| 1892 | ** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes a single argument of |
| 1893 | ** type int, interpreted as a boolean, which if true provides a hint to |
| 1894 | ** SQLite that it should avoid large memory allocations if possible. |
| 1895 | ** SQLite will run faster if it is free to make large memory allocations, |
| 1896 | ** but some applications might prefer to run slower in exchange for |
| 1897 | ** guarantees about memory fragmentation that are possible if large |
| 1898 | ** allocations are avoided. This hint is normally off. |
| 1899 | ** </dd> |
| 1900 | ** |
| 1901 | ** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt> |
| 1902 | ** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes a single argument of type int, |
| 1903 | ** interpreted as a boolean, which enables or disables the collection of |
| 1904 | ** memory allocation statistics. ^(When memory allocation statistics are |
| 1905 | ** disabled, the following SQLite interfaces become non-operational: |
| 1906 | ** <ul> |
| 1907 | ** <li> [sqlite3_hard_heap_limit64()] |
| @@ -1942,11 +1942,11 @@ | |
| 1942 | ** a page cache line is larger than sz bytes or if all of the pMem buffer |
| 1943 | ** is exhausted. |
| 1944 | ** ^If pMem is NULL and N is non-zero, then each database connection |
| 1945 | ** does an initial bulk allocation for page cache memory |
| 1946 | ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or |
| 1947 | ** of -1024*N bytes if N is negative. ^If additional |
| 1948 | ** page cache memory is needed beyond what is provided by the initial |
| 1949 | ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each |
| 1950 | ** additional cache line. </dd> |
| 1951 | ** |
| 1952 | ** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt> |
| @@ -1971,11 +1971,11 @@ | |
| 1971 | ** |
| 1972 | ** [[SQLITE_CONFIG_MUTEX]] <dt>SQLITE_CONFIG_MUTEX</dt> |
| 1973 | ** <dd> ^(The SQLITE_CONFIG_MUTEX option takes a single argument which is a |
| 1974 | ** pointer to an instance of the [sqlite3_mutex_methods] structure. |
| 1975 | ** The argument specifies alternative low-level mutex routines to be used |
| 1976 | ** in place of the mutex routines built into SQLite.)^ ^SQLite makes a copy of |
| 1977 | ** the content of the [sqlite3_mutex_methods] structure before the call to |
| 1978 | ** [sqlite3_config()] returns. ^If SQLite is compiled with |
| 1979 | ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then |
| 1980 | ** the entire mutexing subsystem is omitted from the build and hence calls to |
| 1981 | ** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will |
| @@ -2013,11 +2013,11 @@ | |
| 2013 | ** the interface to a custom page cache implementation.)^ |
| 2014 | ** ^SQLite makes a copy of the [sqlite3_pcache_methods2] object.</dd> |
| 2015 | ** |
| 2016 | ** [[SQLITE_CONFIG_GETPCACHE2]] <dt>SQLITE_CONFIG_GETPCACHE2</dt> |
| 2017 | ** <dd> ^(The SQLITE_CONFIG_GETPCACHE2 option takes a single argument which |
| 2018 | ** is a pointer to an [sqlite3_pcache_methods2] object. SQLite copies off |
| 2019 | ** the current page cache implementation into that object.)^ </dd> |
| 2020 | ** |
| 2021 | ** [[SQLITE_CONFIG_LOG]] <dt>SQLITE_CONFIG_LOG</dt> |
| 2022 | ** <dd> The SQLITE_CONFIG_LOG option is used to configure the SQLite |
| 2023 | ** global [error log]. |
| @@ -2030,11 +2030,11 @@ | |
| 2030 | ** passed through as the first parameter to the application-defined logger |
| 2031 | ** function whenever that function is invoked. ^The second parameter to |
| 2032 | ** the logger function is a copy of the first parameter to the corresponding |
| 2033 | ** [sqlite3_log()] call and is intended to be a [result code] or an |
| 2034 | ** [extended result code]. ^The third parameter passed to the logger is |
| 2035 | ** a log message after formatting via [sqlite3_snprintf()]. |
| 2036 | ** The SQLite logging interface is not reentrant; the logger function |
| 2037 | ** supplied by the application must not invoke any SQLite interface. |
| 2038 | ** In a multi-threaded application, the application-defined logger |
| 2039 | ** function must be threadsafe. </dd> |
| 2040 | ** |
| @@ -2221,11 +2221,11 @@ | |
| 2221 | ** CAPI3REF: Database Connection Configuration Options |
| 2222 | ** |
| 2223 | ** These constants are the available integer configuration options that |
| 2224 | ** can be passed as the second parameter to the [sqlite3_db_config()] interface. |
| 2225 | ** |
| 2226 | ** The [sqlite3_db_config()] interface is a var-args function. It takes a |
| 2227 | ** variable number of parameters, though always at least two. The number of |
| 2228 | ** parameters passed into sqlite3_db_config() depends on which of these |
| 2229 | ** constants is given as the second parameter. This documentation page |
| 2230 | ** refers to parameters beyond the second as "arguments". Thus, when this |
| 2231 | ** page says "the N-th argument" it means "the N-th parameter past the |
| @@ -2355,12 +2355,12 @@ | |
| 2355 | ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()]. |
| 2356 | ** There must be two additional arguments. |
| 2357 | ** When the first argument to this interface is 1, then only the C-API is |
| 2358 | ** enabled and the SQL function remains disabled. If the first argument to |
| 2359 | ** this interface is 0, then both the C-API and the SQL function are disabled. |
| 2360 | ** If the first argument is -1, then no changes are made to the state of either |
| 2361 | ** the C-API or the SQL function. |
| 2362 | ** The second parameter is a pointer to an integer into which |
| 2363 | ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface |
| 2364 | ** is disabled or enabled following this call. The second parameter may |
| 2365 | ** be a NULL pointer, in which case the new setting is not reported back. |
| 2366 | ** </dd> |
| @@ -2474,11 +2474,11 @@ | |
| 2474 | ** </dd> |
| 2475 | ** |
| 2476 | ** [[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE]] |
| 2477 | ** <dt>SQLITE_DBCONFIG_LEGACY_ALTER_TABLE</dt> |
| 2478 | ** <dd>The SQLITE_DBCONFIG_LEGACY_ALTER_TABLE option activates or deactivates |
| 2479 | ** the legacy behavior of the [ALTER TABLE RENAME] command such that it |
| 2480 | ** behaves as it did prior to [version 3.24.0] (2018-06-04). See the |
| 2481 | ** "Compatibility Notice" on the [ALTER TABLE RENAME documentation] for |
| 2482 | ** additional information. This feature can also be turned on and off |
| 2483 | ** using the [PRAGMA legacy_alter_table] statement. |
| 2484 | ** </dd> |
| @@ -2523,11 +2523,11 @@ | |
| 2523 | ** |
| 2524 | ** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] |
| 2525 | ** <dt>SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</dt> |
| 2526 | ** <dd>The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates |
| 2527 | ** the legacy file format flag. When activated, this flag causes all newly |
| 2528 | ** created database files to have a schema format version number (the 4-byte |
| 2529 | ** integer found at offset 44 into the database header) of 1. This in turn |
| 2530 | ** means that the resulting database file will be readable and writable by |
| 2531 | ** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, |
| 2532 | ** newly created databases are generally not understandable by SQLite versions |
| 2533 | ** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there |
| @@ -2550,11 +2550,11 @@ | |
| 2550 | ** a flag that enables collection of the sqlite3_stmt_scanstatus_v2() |
| 2551 | ** statistics. For statistics to be collected, the flag must be set on |
| 2552 | ** the database handle both when the SQL statement is prepared and when it |
| 2553 | ** is stepped. The flag is set (collection of statistics is enabled) |
| 2554 | ** by default. <p>This option takes two arguments: an integer and a pointer to |
| 2555 | ** an integer. The first argument is 1, 0, or -1 to enable, disable, or |
| 2556 | ** leave unchanged the statement scanstatus option. If the second argument |
| 2557 | ** is not NULL, then the value of the statement scanstatus setting after |
| 2558 | ** processing the first argument is written into the integer that the second |
| 2559 | ** argument points to. |
| 2560 | ** </dd> |
| @@ -2593,12 +2593,12 @@ | |
| 2593 | ** [[SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE]] |
| 2594 | ** <dt>SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE</dt> |
| 2595 | ** <dd>The SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE option enables or disables the |
| 2596 | ** ability of the [ATTACH DATABASE] SQL command to open a database for writing. |
| 2597 | ** This capability is enabled by default. Applications can disable or |
| 2598 | ** reenable this capability using the current DBCONFIG option. If |
| 2599 | ** this capability is disabled, the [ATTACH] command will still work, |
| 2600 | ** but the database will be opened read-only. If this option is disabled, |
| 2601 | ** then the ability to create a new database using [ATTACH] is also disabled, |
| 2602 | ** regardless of the value of the [SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE] |
| 2603 | ** option.<p> |
| 2604 | ** This option takes two arguments which are an integer and a pointer |
| @@ -2628,11 +2628,11 @@ | |
| 2628 | ** |
| 2629 | ** [[DBCONFIG arguments]] <h3>Arguments To SQLITE_DBCONFIG Options</h3> |
| 2630 | ** |
| 2631 | ** <p>Most of the SQLITE_DBCONFIG options take two arguments, so that the |
| 2632 | ** overall call to [sqlite3_db_config()] has a total of four parameters. |
| 2633 | ** The first argument (the third parameter to sqlite3_db_config()) is an integer. |
| 2634 | ** The second argument is a pointer to an integer. If the first argument is 1, |
| 2635 | ** then the option becomes enabled. If the first integer argument is 0, then the |
| 2636 | ** option is disabled. If the first argument is -1, then the option setting |
| 2637 | ** is unchanged. The second argument, the pointer to an integer, may be NULL. |
| 2638 | ** If the second argument is not NULL, then a value of 0 or 1 is written into |
| @@ -2918,11 +2918,11 @@ | |
| 2918 | ** and comments that follow the final semicolon are ignored. |
| 2919 | ** |
| 2920 | ** ^These routines return 0 if the statement is incomplete. ^If a |
| 2921 | ** memory allocation fails, then SQLITE_NOMEM is returned. |
| 2922 | ** |
| 2923 | ** ^These routines do not parse the SQL statements and thus |
| 2924 | ** will not detect syntactically incorrect SQL. |
| 2925 | ** |
| 2926 | ** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior |
| 2927 | ** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked |
| 2928 | ** automatically by sqlite3_complete16(). If that initialization fails, |
| @@ -3035,11 +3035,11 @@ | |
| 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 stores 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 |
| @@ -3065,11 +3065,11 @@ | |
| 3065 | ** METHOD: sqlite3 |
| 3066 | ** |
| 3067 | ** This is a legacy interface that is preserved for backwards compatibility. |
| 3068 | ** Use of this interface is not recommended. |
| 3069 | ** |
| 3070 | ** Definition: A <b>result table</b> is a memory data structure created by the |
| 3071 | ** [sqlite3_get_table()] interface. A result table records the |
| 3072 | ** complete query results from one or more queries. |
| 3073 | ** |
| 3074 | ** The table conceptually has a number of rows and columns. But |
| 3075 | ** these numbers are not part of the result table itself. These |
| @@ -3208,11 +3208,11 @@ | |
| 3208 | ** of a signed 32-bit integer. |
| 3209 | ** |
| 3210 | ** ^Calling sqlite3_free() with a pointer previously returned |
| 3211 | ** by sqlite3_malloc() or sqlite3_realloc() releases that memory so |
| 3212 | ** that it might be reused. ^The sqlite3_free() routine is |
| 3213 | ** a no-op if it is called with a NULL pointer. Passing a NULL pointer |
| 3214 | ** to sqlite3_free() is harmless. After being freed, memory |
| 3215 | ** should neither be read nor written. Even reading previously freed |
| 3216 | ** memory might result in a segmentation fault or other severe error. |
| 3217 | ** Memory corruption, a segmentation fault, or other severe error |
| 3218 | ** might result if sqlite3_free() is called with a non-NULL pointer that |
| @@ -3226,17 +3226,17 @@ | |
| 3226 | ** ^If the N parameter to sqlite3_realloc(X,N) is zero or |
| 3227 | ** negative then the behavior is exactly the same as calling |
| 3228 | ** sqlite3_free(X). |
| 3229 | ** ^sqlite3_realloc(X,N) returns a pointer to a memory allocation |
| 3230 | ** of at least N bytes in size or NULL if insufficient memory is available. |
| 3231 | ** ^If M is the size of the prior allocation, then min(N,M) bytes of the |
| 3232 | ** prior allocation are copied into the beginning of the buffer returned |
| 3233 | ** by sqlite3_realloc(X,N) and the prior allocation is freed. |
| 3234 | ** ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the |
| 3235 | ** prior allocation is not freed. |
| 3236 | ** |
| 3237 | ** ^The sqlite3_realloc64(X,N) interface works the same as |
| 3238 | ** sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead |
| 3239 | ** of a 32-bit signed integer. |
| 3240 | ** |
| 3241 | ** ^If X is a memory allocation previously obtained from sqlite3_malloc(), |
| 3242 | ** sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then |
| @@ -3282,11 +3282,11 @@ | |
| 3282 | ** ^The [sqlite3_memory_highwater()] routine returns the maximum |
| 3283 | ** value of [sqlite3_memory_used()] since the high-water mark |
| 3284 | ** was last reset. ^The values returned by [sqlite3_memory_used()] and |
| 3285 | ** [sqlite3_memory_highwater()] include any overhead |
| 3286 | ** added by SQLite in its implementation of [sqlite3_malloc()], |
| 3287 | ** but not overhead added by any underlying system library |
| 3288 | ** routines that [sqlite3_malloc()] may call. |
| 3289 | ** |
| 3290 | ** ^The memory high-water mark is reset to the current value of |
| 3291 | ** [sqlite3_memory_used()] if and only if the parameter to |
| 3292 | ** [sqlite3_memory_highwater()] is true. ^The value returned |
| @@ -3734,19 +3734,19 @@ | |
| 3734 | ** attempt to use the same database connection at the same time. |
| 3735 | ** (Mutexes will block any actual concurrency, but in this mode |
| 3736 | ** there is no harm in trying.) |
| 3737 | ** |
| 3738 | ** ^(<dt>[SQLITE_OPEN_SHAREDCACHE]</dt> |
| 3739 | ** <dd>The database is opened with [shared cache] enabled, overriding |
| 3740 | ** the default shared cache setting provided by |
| 3741 | ** [sqlite3_enable_shared_cache()].)^ |
| 3742 | ** The [use of shared cache mode is discouraged] and hence shared cache |
| 3743 | ** capabilities may be omitted from many builds of SQLite. In such cases, |
| 3744 | ** this option is a no-op. |
| 3745 | ** |
| 3746 | ** ^(<dt>[SQLITE_OPEN_PRIVATECACHE]</dt> |
| 3747 | ** <dd>The database is opened with [shared cache] disabled, overriding |
| 3748 | ** the default shared cache setting provided by |
| 3749 | ** [sqlite3_enable_shared_cache()].)^ |
| 3750 | ** |
| 3751 | ** [[OPEN_EXRESCODE]] ^(<dt>[SQLITE_OPEN_EXRESCODE]</dt> |
| 3752 | ** <dd>The database connection comes up in "extended result code mode". |
| 3753 |