Fossil SCM

Update the built-in SQLite to version 3.38.0 final.

drh 2022-02-22 19:13 trunk
Commit c55e0f6ca37836ffa67bc4684ab29269b7420b59dc7861b6f7c142a5b34ed22e
+3 -2
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -5449,11 +5449,11 @@
54495449
unsigned int i;
54505450
int rc = SQLITE_OK;
54515451
SQLITE_EXTENSION_INIT2(pApi);
54525452
(void)pzErrMsg; /* Unused parameter */
54535453
for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
5454
- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
5454
+ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
54555455
SQLITE_UTF8|SQLITE_INNOCUOUS,
54565456
(void*)&aFunc[i].iAux,
54575457
aFunc[i].xFunc, 0, 0);
54585458
}
54595459
return rc;
@@ -15322,10 +15322,11 @@
1532215322
#endif
1532315323
#ifndef SQLITE_OMIT_AUTHORIZATION
1532415324
".auth ON|OFF Show authorizer callbacks",
1532515325
#endif
1532615326
".backup ?DB? FILE Backup DB (default \"main\") to FILE",
15327
+ " Options:",
1532715328
" --append Use the appendvfs",
1532815329
" --async Write to FILE without journal and fsync()",
1532915330
".bail on|off Stop after hitting an error. Default OFF",
1533015331
".binary on|off Turn binary output on or off. Default OFF",
1533115332
".cd DIRECTORY Change the working directory to DIRECTORY",
@@ -15469,11 +15470,11 @@
1546915470
" --lost-and-found TABLE Alternative name for the lost-and-found table",
1547015471
" --no-rowids Do not attempt to recover rowid values",
1547115472
" that are not also INTEGER PRIMARY KEYs",
1547215473
#endif
1547315474
".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
15474
- ".save FILE Write in-memory database into FILE",
15475
+ ".save ?OPTIONS? FILE Write database to FILE (an alias for .backup ...)",
1547515476
".scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off",
1547615477
".schema ?PATTERN? Show the CREATE statements matching PATTERN",
1547715478
" Options:",
1547815479
" --indent Try to pretty-print the schema",
1547915480
" --nosys Omit objects whose names start with \"sqlite_\"",
1548015481
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -5449,11 +5449,11 @@
5449 unsigned int i;
5450 int rc = SQLITE_OK;
5451 SQLITE_EXTENSION_INIT2(pApi);
5452 (void)pzErrMsg; /* Unused parameter */
5453 for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
5454 rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
5455 SQLITE_UTF8|SQLITE_INNOCUOUS,
5456 (void*)&aFunc[i].iAux,
5457 aFunc[i].xFunc, 0, 0);
5458 }
5459 return rc;
@@ -15322,10 +15322,11 @@
15322 #endif
15323 #ifndef SQLITE_OMIT_AUTHORIZATION
15324 ".auth ON|OFF Show authorizer callbacks",
15325 #endif
15326 ".backup ?DB? FILE Backup DB (default \"main\") to FILE",
 
15327 " --append Use the appendvfs",
15328 " --async Write to FILE without journal and fsync()",
15329 ".bail on|off Stop after hitting an error. Default OFF",
15330 ".binary on|off Turn binary output on or off. Default OFF",
15331 ".cd DIRECTORY Change the working directory to DIRECTORY",
@@ -15469,11 +15470,11 @@
15469 " --lost-and-found TABLE Alternative name for the lost-and-found table",
15470 " --no-rowids Do not attempt to recover rowid values",
15471 " that are not also INTEGER PRIMARY KEYs",
15472 #endif
15473 ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
15474 ".save FILE Write in-memory database into FILE",
15475 ".scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off",
15476 ".schema ?PATTERN? Show the CREATE statements matching PATTERN",
15477 " Options:",
15478 " --indent Try to pretty-print the schema",
15479 " --nosys Omit objects whose names start with \"sqlite_\"",
15480
--- extsrc/shell.c
+++ extsrc/shell.c
@@ -5449,11 +5449,11 @@
5449 unsigned int i;
5450 int rc = SQLITE_OK;
5451 SQLITE_EXTENSION_INIT2(pApi);
5452 (void)pzErrMsg; /* Unused parameter */
5453 for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
5454 rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
5455 SQLITE_UTF8|SQLITE_INNOCUOUS,
5456 (void*)&aFunc[i].iAux,
5457 aFunc[i].xFunc, 0, 0);
5458 }
5459 return rc;
@@ -15322,10 +15322,11 @@
15322 #endif
15323 #ifndef SQLITE_OMIT_AUTHORIZATION
15324 ".auth ON|OFF Show authorizer callbacks",
15325 #endif
15326 ".backup ?DB? FILE Backup DB (default \"main\") to FILE",
15327 " Options:",
15328 " --append Use the appendvfs",
15329 " --async Write to FILE without journal and fsync()",
15330 ".bail on|off Stop after hitting an error. Default OFF",
15331 ".binary on|off Turn binary output on or off. Default OFF",
15332 ".cd DIRECTORY Change the working directory to DIRECTORY",
@@ -15469,11 +15470,11 @@
15470 " --lost-and-found TABLE Alternative name for the lost-and-found table",
15471 " --no-rowids Do not attempt to recover rowid values",
15472 " that are not also INTEGER PRIMARY KEYs",
15473 #endif
15474 ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
15475 ".save ?OPTIONS? FILE Write database to FILE (an alias for .backup ...)",
15476 ".scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off",
15477 ".schema ?PATTERN? Show the CREATE statements matching PATTERN",
15478 " Options:",
15479 " --indent Try to pretty-print the schema",
15480 " --nosys Omit objects whose names start with \"sqlite_\"",
15481
+15 -7
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -452,11 +452,11 @@
452452
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
453453
** [sqlite_version()] and [sqlite_source_id()].
454454
*/
455455
#define SQLITE_VERSION "3.38.0"
456456
#define SQLITE_VERSION_NUMBER 3038000
457
-#define SQLITE_SOURCE_ID "2022-02-15 13:23:09 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006"
457
+#define SQLITE_SOURCE_ID "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab"
458458
459459
/*
460460
** CAPI3REF: Run-Time Library Version Numbers
461461
** KEYWORDS: sqlite3_version sqlite3_sourceid
462462
**
@@ -4588,10 +4588,14 @@
45884588
** ^For example, an UPDATE statement might have a WHERE clause that
45894589
** makes it a no-op, but the sqlite3_stmt_readonly() result would still
45904590
** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
45914591
** read-only no-op if the table already exists, but
45924592
** sqlite3_stmt_readonly() still returns false for such a statement.
4593
+**
4594
+** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]
4595
+** statement, then sqlite3_stmt_readonly(X) returns the same value as
4596
+** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.
45934597
*/
45944598
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
45954599
45964600
/*
45974601
** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
@@ -23620,12 +23624,12 @@
2362023624
2362123625
/* Initialize the contents of sLocal to avoid a compiler warning. */
2362223626
memset(&sLocal, 0, sizeof(sLocal));
2362323627
2362423628
computeJD(p);
23625
- if( p->iJD<21086676000*(i64)10000 /* 1970-01-01 */
23626
- || p->iJD>21301414560*(i64)10000 /* 2038-01-18 */
23629
+ if( p->iJD<2108667600*(i64)100000 /* 1970-01-01 */
23630
+ || p->iJD>2130141456*(i64)100000 /* 2038-01-18 */
2362723631
){
2362823632
/* EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only
2362923633
** works for years between 1970 and 2037. For dates outside this range,
2363023634
** SQLite attempts to map the year into an equivalent year within this
2363123635
** range, do the calculation, then map the year back.
@@ -23727,11 +23731,13 @@
2372723731
if( sqlite3_stricmp(z, "auto")==0 ){
2372823732
if( idx>1 ) return 1; /* IMP: R-33611-57934 */
2372923733
if( !p->rawS || p->validJD ){
2373023734
rc = 0;
2373123735
p->rawS = 0;
23732
- }else if( p->s>=-210866760000 && p->s<=253402300799 ){
23736
+ }else if( p->s>=-21086676*(i64)10000 /* -4713-11-24 12:00:00 */
23737
+ && p->s<=(25340230*(i64)10000)+799 /* 9999-12-31 23:59:59 */
23738
+ ){
2373323739
r = p->s*1000.0 + 210866760000000.0;
2373423740
clearYMD_HMS_TZ(p);
2373523741
p->iJD = (sqlite3_int64)(r + 0.5);
2373623742
p->validJD = 1;
2373723743
p->rawS = 0;
@@ -79457,11 +79463,11 @@
7945779463
*ppVal = pVal;
7945879464
return rc;
7945979465
7946079466
no_mem:
7946179467
#ifdef SQLITE_ENABLE_STAT4
79462
- if( pCtx==0 || pCtx->pParse->nErr==0 )
79468
+ if( pCtx==0 || NEVER(pCtx->pParse->nErr==0) )
7946379469
#endif
7946479470
sqlite3OomFault(db);
7946579471
sqlite3DbFree(db, zVal);
7946679472
assert( *ppVal==0 );
7946779473
#ifdef SQLITE_ENABLE_STAT4
@@ -90598,11 +90604,11 @@
9059890604
}
9059990605
nHdr++;
9060090606
testcase( uu==127 ); testcase( uu==128 );
9060190607
testcase( uu==32767 ); testcase( uu==32768 );
9060290608
testcase( uu==8388607 ); testcase( uu==8388608 );
90603
- testcase( uu==2147483647 ); testcase( uu==2147483648 );
90609
+ testcase( uu==2147483647 ); testcase( uu==2147483648LL );
9060490610
testcase( uu==140737488355327LL ); testcase( uu==140737488355328LL );
9060590611
if( uu<=127 ){
9060690612
if( (i&1)==i && file_format>=4 ){
9060790613
pRec->uTemp = 8+(u32)uu;
9060890614
}else{
@@ -114178,10 +114184,12 @@
114178114184
pParse->nested++;
114179114185
memcpy(saveBuf, PARSE_TAIL(pParse), PARSE_TAIL_SZ);
114180114186
memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);
114181114187
db->mDbFlags |= DBFLAG_PreferBuiltin;
114182114188
sqlite3RunParser(pParse, zSql);
114189
+ sqlite3DbFree(db, pParse->zErrMsg);
114190
+ pParse->zErrMsg = 0;
114183114191
db->mDbFlags = savedDbFlags;
114184114192
sqlite3DbFree(db, zSql);
114185114193
memcpy(PARSE_TAIL(pParse), saveBuf, PARSE_TAIL_SZ);
114186114194
pParse->nested--;
114187114195
}
@@ -234290,11 +234298,11 @@
234290234298
int nArg, /* Number of args */
234291234299
sqlite3_value **apUnused /* Function arguments */
234292234300
){
234293234301
assert( nArg==0 );
234294234302
UNUSED_PARAM2(nArg, apUnused);
234295
- sqlite3_result_text(pCtx, "fts5: 2022-02-15 13:23:09 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006", -1, SQLITE_TRANSIENT);
234303
+ sqlite3_result_text(pCtx, "fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab", -1, SQLITE_TRANSIENT);
234296234304
}
234297234305
234298234306
/*
234299234307
** Return true if zName is the extension on one of the shadow tables used
234300234308
** by this module.
234301234309
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -452,11 +452,11 @@
452 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
453 ** [sqlite_version()] and [sqlite_source_id()].
454 */
455 #define SQLITE_VERSION "3.38.0"
456 #define SQLITE_VERSION_NUMBER 3038000
457 #define SQLITE_SOURCE_ID "2022-02-15 13:23:09 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006"
458
459 /*
460 ** CAPI3REF: Run-Time Library Version Numbers
461 ** KEYWORDS: sqlite3_version sqlite3_sourceid
462 **
@@ -4588,10 +4588,14 @@
4588 ** ^For example, an UPDATE statement might have a WHERE clause that
4589 ** makes it a no-op, but the sqlite3_stmt_readonly() result would still
4590 ** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
4591 ** read-only no-op if the table already exists, but
4592 ** sqlite3_stmt_readonly() still returns false for such a statement.
 
 
 
 
4593 */
4594 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
4595
4596 /*
4597 ** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
@@ -23620,12 +23624,12 @@
23620
23621 /* Initialize the contents of sLocal to avoid a compiler warning. */
23622 memset(&sLocal, 0, sizeof(sLocal));
23623
23624 computeJD(p);
23625 if( p->iJD<21086676000*(i64)10000 /* 1970-01-01 */
23626 || p->iJD>21301414560*(i64)10000 /* 2038-01-18 */
23627 ){
23628 /* EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only
23629 ** works for years between 1970 and 2037. For dates outside this range,
23630 ** SQLite attempts to map the year into an equivalent year within this
23631 ** range, do the calculation, then map the year back.
@@ -23727,11 +23731,13 @@
23727 if( sqlite3_stricmp(z, "auto")==0 ){
23728 if( idx>1 ) return 1; /* IMP: R-33611-57934 */
23729 if( !p->rawS || p->validJD ){
23730 rc = 0;
23731 p->rawS = 0;
23732 }else if( p->s>=-210866760000 && p->s<=253402300799 ){
 
 
23733 r = p->s*1000.0 + 210866760000000.0;
23734 clearYMD_HMS_TZ(p);
23735 p->iJD = (sqlite3_int64)(r + 0.5);
23736 p->validJD = 1;
23737 p->rawS = 0;
@@ -79457,11 +79463,11 @@
79457 *ppVal = pVal;
79458 return rc;
79459
79460 no_mem:
79461 #ifdef SQLITE_ENABLE_STAT4
79462 if( pCtx==0 || pCtx->pParse->nErr==0 )
79463 #endif
79464 sqlite3OomFault(db);
79465 sqlite3DbFree(db, zVal);
79466 assert( *ppVal==0 );
79467 #ifdef SQLITE_ENABLE_STAT4
@@ -90598,11 +90604,11 @@
90598 }
90599 nHdr++;
90600 testcase( uu==127 ); testcase( uu==128 );
90601 testcase( uu==32767 ); testcase( uu==32768 );
90602 testcase( uu==8388607 ); testcase( uu==8388608 );
90603 testcase( uu==2147483647 ); testcase( uu==2147483648 );
90604 testcase( uu==140737488355327LL ); testcase( uu==140737488355328LL );
90605 if( uu<=127 ){
90606 if( (i&1)==i && file_format>=4 ){
90607 pRec->uTemp = 8+(u32)uu;
90608 }else{
@@ -114178,10 +114184,12 @@
114178 pParse->nested++;
114179 memcpy(saveBuf, PARSE_TAIL(pParse), PARSE_TAIL_SZ);
114180 memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);
114181 db->mDbFlags |= DBFLAG_PreferBuiltin;
114182 sqlite3RunParser(pParse, zSql);
 
 
114183 db->mDbFlags = savedDbFlags;
114184 sqlite3DbFree(db, zSql);
114185 memcpy(PARSE_TAIL(pParse), saveBuf, PARSE_TAIL_SZ);
114186 pParse->nested--;
114187 }
@@ -234290,11 +234298,11 @@
234290 int nArg, /* Number of args */
234291 sqlite3_value **apUnused /* Function arguments */
234292 ){
234293 assert( nArg==0 );
234294 UNUSED_PARAM2(nArg, apUnused);
234295 sqlite3_result_text(pCtx, "fts5: 2022-02-15 13:23:09 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006", -1, SQLITE_TRANSIENT);
234296 }
234297
234298 /*
234299 ** Return true if zName is the extension on one of the shadow tables used
234300 ** by this module.
234301
--- extsrc/sqlite3.c
+++ extsrc/sqlite3.c
@@ -452,11 +452,11 @@
452 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
453 ** [sqlite_version()] and [sqlite_source_id()].
454 */
455 #define SQLITE_VERSION "3.38.0"
456 #define SQLITE_VERSION_NUMBER 3038000
457 #define SQLITE_SOURCE_ID "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab"
458
459 /*
460 ** CAPI3REF: Run-Time Library Version Numbers
461 ** KEYWORDS: sqlite3_version sqlite3_sourceid
462 **
@@ -4588,10 +4588,14 @@
4588 ** ^For example, an UPDATE statement might have a WHERE clause that
4589 ** makes it a no-op, but the sqlite3_stmt_readonly() result would still
4590 ** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
4591 ** read-only no-op if the table already exists, but
4592 ** sqlite3_stmt_readonly() still returns false for such a statement.
4593 **
4594 ** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]
4595 ** statement, then sqlite3_stmt_readonly(X) returns the same value as
4596 ** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.
4597 */
4598 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
4599
4600 /*
4601 ** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
@@ -23620,12 +23624,12 @@
23624
23625 /* Initialize the contents of sLocal to avoid a compiler warning. */
23626 memset(&sLocal, 0, sizeof(sLocal));
23627
23628 computeJD(p);
23629 if( p->iJD<2108667600*(i64)100000 /* 1970-01-01 */
23630 || p->iJD>2130141456*(i64)100000 /* 2038-01-18 */
23631 ){
23632 /* EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only
23633 ** works for years between 1970 and 2037. For dates outside this range,
23634 ** SQLite attempts to map the year into an equivalent year within this
23635 ** range, do the calculation, then map the year back.
@@ -23727,11 +23731,13 @@
23731 if( sqlite3_stricmp(z, "auto")==0 ){
23732 if( idx>1 ) return 1; /* IMP: R-33611-57934 */
23733 if( !p->rawS || p->validJD ){
23734 rc = 0;
23735 p->rawS = 0;
23736 }else if( p->s>=-21086676*(i64)10000 /* -4713-11-24 12:00:00 */
23737 && p->s<=(25340230*(i64)10000)+799 /* 9999-12-31 23:59:59 */
23738 ){
23739 r = p->s*1000.0 + 210866760000000.0;
23740 clearYMD_HMS_TZ(p);
23741 p->iJD = (sqlite3_int64)(r + 0.5);
23742 p->validJD = 1;
23743 p->rawS = 0;
@@ -79457,11 +79463,11 @@
79463 *ppVal = pVal;
79464 return rc;
79465
79466 no_mem:
79467 #ifdef SQLITE_ENABLE_STAT4
79468 if( pCtx==0 || NEVER(pCtx->pParse->nErr==0) )
79469 #endif
79470 sqlite3OomFault(db);
79471 sqlite3DbFree(db, zVal);
79472 assert( *ppVal==0 );
79473 #ifdef SQLITE_ENABLE_STAT4
@@ -90598,11 +90604,11 @@
90604 }
90605 nHdr++;
90606 testcase( uu==127 ); testcase( uu==128 );
90607 testcase( uu==32767 ); testcase( uu==32768 );
90608 testcase( uu==8388607 ); testcase( uu==8388608 );
90609 testcase( uu==2147483647 ); testcase( uu==2147483648LL );
90610 testcase( uu==140737488355327LL ); testcase( uu==140737488355328LL );
90611 if( uu<=127 ){
90612 if( (i&1)==i && file_format>=4 ){
90613 pRec->uTemp = 8+(u32)uu;
90614 }else{
@@ -114178,10 +114184,12 @@
114184 pParse->nested++;
114185 memcpy(saveBuf, PARSE_TAIL(pParse), PARSE_TAIL_SZ);
114186 memset(PARSE_TAIL(pParse), 0, PARSE_TAIL_SZ);
114187 db->mDbFlags |= DBFLAG_PreferBuiltin;
114188 sqlite3RunParser(pParse, zSql);
114189 sqlite3DbFree(db, pParse->zErrMsg);
114190 pParse->zErrMsg = 0;
114191 db->mDbFlags = savedDbFlags;
114192 sqlite3DbFree(db, zSql);
114193 memcpy(PARSE_TAIL(pParse), saveBuf, PARSE_TAIL_SZ);
114194 pParse->nested--;
114195 }
@@ -234290,11 +234298,11 @@
234298 int nArg, /* Number of args */
234299 sqlite3_value **apUnused /* Function arguments */
234300 ){
234301 assert( nArg==0 );
234302 UNUSED_PARAM2(nArg, apUnused);
234303 sqlite3_result_text(pCtx, "fts5: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab", -1, SQLITE_TRANSIENT);
234304 }
234305
234306 /*
234307 ** Return true if zName is the extension on one of the shadow tables used
234308 ** by this module.
234309
--- extsrc/sqlite3.h
+++ extsrc/sqlite3.h
@@ -146,11 +146,11 @@
146146
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
147147
** [sqlite_version()] and [sqlite_source_id()].
148148
*/
149149
#define SQLITE_VERSION "3.38.0"
150150
#define SQLITE_VERSION_NUMBER 3038000
151
-#define SQLITE_SOURCE_ID "2022-02-15 13:23:09 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006"
151
+#define SQLITE_SOURCE_ID "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab"
152152
153153
/*
154154
** CAPI3REF: Run-Time Library Version Numbers
155155
** KEYWORDS: sqlite3_version sqlite3_sourceid
156156
**
@@ -4282,10 +4282,14 @@
42824282
** ^For example, an UPDATE statement might have a WHERE clause that
42834283
** makes it a no-op, but the sqlite3_stmt_readonly() result would still
42844284
** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
42854285
** read-only no-op if the table already exists, but
42864286
** sqlite3_stmt_readonly() still returns false for such a statement.
4287
+**
4288
+** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]
4289
+** statement, then sqlite3_stmt_readonly(X) returns the same value as
4290
+** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.
42874291
*/
42884292
SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
42894293
42904294
/*
42914295
** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
42924296
--- 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.38.0"
150 #define SQLITE_VERSION_NUMBER 3038000
151 #define SQLITE_SOURCE_ID "2022-02-15 13:23:09 9edaeed56f2282fd4da935454178c38ab49d259aed96d4e720aae09050a53006"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -4282,10 +4282,14 @@
4282 ** ^For example, an UPDATE statement might have a WHERE clause that
4283 ** makes it a no-op, but the sqlite3_stmt_readonly() result would still
4284 ** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
4285 ** read-only no-op if the table already exists, but
4286 ** sqlite3_stmt_readonly() still returns false for such a statement.
 
 
 
 
4287 */
4288 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
4289
4290 /*
4291 ** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
4292
--- 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.38.0"
150 #define SQLITE_VERSION_NUMBER 3038000
151 #define SQLITE_SOURCE_ID "2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab"
152
153 /*
154 ** CAPI3REF: Run-Time Library Version Numbers
155 ** KEYWORDS: sqlite3_version sqlite3_sourceid
156 **
@@ -4282,10 +4282,14 @@
4282 ** ^For example, an UPDATE statement might have a WHERE clause that
4283 ** makes it a no-op, but the sqlite3_stmt_readonly() result would still
4284 ** be false. ^Similarly, a CREATE TABLE IF NOT EXISTS statement is a
4285 ** read-only no-op if the table already exists, but
4286 ** sqlite3_stmt_readonly() still returns false for such a statement.
4287 **
4288 ** ^If prepared statement X is an [EXPLAIN] or [EXPLAIN QUERY PLAN]
4289 ** statement, then sqlite3_stmt_readonly(X) returns the same value as
4290 ** if the EXPLAIN or EXPLAIN QUERY PLAN prefix were omitted.
4291 */
4292 SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
4293
4294 /*
4295 ** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
4296

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button