Fossil SCM

Update the built-in SQLite to version 3.35.0 final.

drh 2021-03-12 15:22 trunk
Commit b06953e15e93b4cb86dd3a48fe0d7a879bd8c7ac829817f22e237f123c5f1ab0
3 files changed +7 +49 -28 +16 -11
--- src/shell.c
+++ src/shell.c
@@ -3971,10 +3971,11 @@
39713971
*/
39723972
static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
39733973
ApndFile *paf = (ApndFile *)pFile;
39743974
int rc;
39753975
pFile = ORIGFILE(pFile);
3976
+ if( op==SQLITE_FCNTL_SIZE_HINT ) *(sqlite3_int64*)pArg += paf->iPgOne;
39763977
rc = pFile->pMethods->xFileControl(pFile, op, pArg);
39773978
if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){
39783979
*(char**)pArg = sqlite3_mprintf("apnd(%lld)/%z", paf->iPgOne,*(char**)pArg);
39793980
}
39803981
return rc;
@@ -19181,18 +19182,24 @@
1918119182
raw_printf(stderr, "Usage: .read FILE\n");
1918219183
rc = 1;
1918319184
goto meta_command_exit;
1918419185
}
1918519186
if( azArg[1][0]=='|' ){
19187
+#ifdef SQLITE_OMIT_POPEN
19188
+ raw_printf(stderr, "Error: pipes are not supported in this OS\n");
19189
+ rc = 1;
19190
+ p->out = stdout;
19191
+#else
1918619192
p->in = popen(azArg[1]+1, "r");
1918719193
if( p->in==0 ){
1918819194
utf8_printf(stderr, "Error: cannot open \"%s\"\n", azArg[1]);
1918919195
rc = 1;
1919019196
}else{
1919119197
rc = process_input(p);
1919219198
pclose(p->in);
1919319199
}
19200
+#endif
1919419201
}else if( notNormalFile(azArg[1]) || (p->in = fopen(azArg[1], "rb"))==0 ){
1919519202
utf8_printf(stderr,"Error: cannot open \"%s\"\n", azArg[1]);
1919619203
rc = 1;
1919719204
}else{
1919819205
rc = process_input(p);
1919919206
--- src/shell.c
+++ src/shell.c
@@ -3971,10 +3971,11 @@
3971 */
3972 static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
3973 ApndFile *paf = (ApndFile *)pFile;
3974 int rc;
3975 pFile = ORIGFILE(pFile);
 
3976 rc = pFile->pMethods->xFileControl(pFile, op, pArg);
3977 if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){
3978 *(char**)pArg = sqlite3_mprintf("apnd(%lld)/%z", paf->iPgOne,*(char**)pArg);
3979 }
3980 return rc;
@@ -19181,18 +19182,24 @@
19181 raw_printf(stderr, "Usage: .read FILE\n");
19182 rc = 1;
19183 goto meta_command_exit;
19184 }
19185 if( azArg[1][0]=='|' ){
 
 
 
 
 
19186 p->in = popen(azArg[1]+1, "r");
19187 if( p->in==0 ){
19188 utf8_printf(stderr, "Error: cannot open \"%s\"\n", azArg[1]);
19189 rc = 1;
19190 }else{
19191 rc = process_input(p);
19192 pclose(p->in);
19193 }
 
19194 }else if( notNormalFile(azArg[1]) || (p->in = fopen(azArg[1], "rb"))==0 ){
19195 utf8_printf(stderr,"Error: cannot open \"%s\"\n", azArg[1]);
19196 rc = 1;
19197 }else{
19198 rc = process_input(p);
19199
--- src/shell.c
+++ src/shell.c
@@ -3971,10 +3971,11 @@
3971 */
3972 static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
3973 ApndFile *paf = (ApndFile *)pFile;
3974 int rc;
3975 pFile = ORIGFILE(pFile);
3976 if( op==SQLITE_FCNTL_SIZE_HINT ) *(sqlite3_int64*)pArg += paf->iPgOne;
3977 rc = pFile->pMethods->xFileControl(pFile, op, pArg);
3978 if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){
3979 *(char**)pArg = sqlite3_mprintf("apnd(%lld)/%z", paf->iPgOne,*(char**)pArg);
3980 }
3981 return rc;
@@ -19181,18 +19182,24 @@
19182 raw_printf(stderr, "Usage: .read FILE\n");
19183 rc = 1;
19184 goto meta_command_exit;
19185 }
19186 if( azArg[1][0]=='|' ){
19187 #ifdef SQLITE_OMIT_POPEN
19188 raw_printf(stderr, "Error: pipes are not supported in this OS\n");
19189 rc = 1;
19190 p->out = stdout;
19191 #else
19192 p->in = popen(azArg[1]+1, "r");
19193 if( p->in==0 ){
19194 utf8_printf(stderr, "Error: cannot open \"%s\"\n", azArg[1]);
19195 rc = 1;
19196 }else{
19197 rc = process_input(p);
19198 pclose(p->in);
19199 }
19200 #endif
19201 }else if( notNormalFile(azArg[1]) || (p->in = fopen(azArg[1], "rb"))==0 ){
19202 utf8_printf(stderr,"Error: cannot open \"%s\"\n", azArg[1]);
19203 rc = 1;
19204 }else{
19205 rc = process_input(p);
19206
+49 -28
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1186,11 +1186,11 @@
11861186
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11871187
** [sqlite_version()] and [sqlite_source_id()].
11881188
*/
11891189
#define SQLITE_VERSION "3.35.0"
11901190
#define SQLITE_VERSION_NUMBER 3035000
1191
-#define SQLITE_SOURCE_ID "2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303bf8b"
1191
+#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
11921192
11931193
/*
11941194
** CAPI3REF: Run-Time Library Version Numbers
11951195
** KEYWORDS: sqlite3_version sqlite3_sourceid
11961196
**
@@ -11623,22 +11623,27 @@
1162311623
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
1162411624
** created by [sqlite3changeset_start()]. In the latter case, the most recent
1162511625
** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
1162611626
** is not the case, this function returns [SQLITE_MISUSE].
1162711627
**
11628
-** If argument pzTab is not NULL, then *pzTab is set to point to a
11629
-** nul-terminated utf-8 encoded string containing the name of the table
11630
-** affected by the current change. The buffer remains valid until either
11631
-** sqlite3changeset_next() is called on the iterator or until the
11632
-** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
11633
-** set to the number of columns in the table affected by the change. If
11634
-** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
11628
+** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three
11629
+** outputs are set through these pointers:
11630
+**
11631
+** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
11632
+** depending on the type of change that the iterator currently points to;
11633
+**
11634
+** *pnCol is set to the number of columns in the table affected by the change; and
11635
+**
11636
+** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
11637
+** the name of the table affected by the current change. The buffer remains
11638
+** valid until either sqlite3changeset_next() is called on the iterator
11639
+** or until the conflict-handler function returns.
11640
+**
11641
+** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
1163511642
** is an indirect change, or false (0) otherwise. See the documentation for
1163611643
** [sqlite3session_indirect()] for a description of direct and indirect
11637
-** changes. Finally, if pOp is not NULL, then *pOp is set to one of
11638
-** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the
11639
-** type of change that the iterator currently points to.
11644
+** changes.
1164011645
**
1164111646
** If no error occurs, SQLITE_OK is returned. If an error does occur, an
1164211647
** SQLite error code is returned. The values of the output variables may not
1164311648
** be trusted in this case.
1164411649
*/
@@ -16948,10 +16953,15 @@
1694816953
#define SQLITE_TRACE_LEGACY 0
1694916954
#define SQLITE_TRACE_XPROFILE 0
1695016955
#endif /* SQLITE_OMIT_DEPRECATED */
1695116956
#define SQLITE_TRACE_NONLEGACY_MASK 0x0f /* Normal flags */
1695216957
16958
+/*
16959
+** Maximum number of sqlite3.aDb[] entries. This is the number of attached
16960
+** databases plus 2 for "main" and "temp".
16961
+*/
16962
+#define SQLITE_MAX_DB (SQLITE_MAX_ATTACHED+2)
1695316963
1695416964
/*
1695516965
** Each database connection is an instance of the following structure.
1695616966
*/
1695716967
struct sqlite3 {
@@ -103196,11 +103206,11 @@
103196103206
assert( p->pSrc!=0 ); /* Because of isCandidateForInOpt(p) */
103197103207
pTab = p->pSrc->a[0].pTab;
103198103208
103199103209
/* Code an OP_Transaction and OP_TableLock for <table>. */
103200103210
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
103201
- assert( iDb>=0 && iDb<SQLITE_MAX_ATTACHED );
103211
+ assert( iDb>=0 && iDb<SQLITE_MAX_DB );
103202103212
sqlite3CodeVerifySchema(pParse, iDb);
103203103213
sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
103204103214
103205103215
assert(v); /* sqlite3GetVdbe() has always been previously called */
103206103216
if( nExpr==1 && pEList->a[0].pExpr->iColumn<0 ){
@@ -116368,11 +116378,11 @@
116368116378
** later, by sqlite3FinishCoding().
116369116379
*/
116370116380
static void sqlite3CodeVerifySchemaAtToplevel(Parse *pToplevel, int iDb){
116371116381
assert( iDb>=0 && iDb<pToplevel->db->nDb );
116372116382
assert( pToplevel->db->aDb[iDb].pBt!=0 || iDb==1 );
116373
- assert( iDb<SQLITE_MAX_ATTACHED+2 );
116383
+ assert( iDb<SQLITE_MAX_DB );
116374116384
assert( sqlite3SchemaMutexHeld(pToplevel->db, iDb, 0) );
116375116385
if( DbMaskTest(pToplevel->cookieMask, iDb)==0 ){
116376116386
DbMaskSet(pToplevel->cookieMask, iDb);
116377116387
if( !OMIT_TEMPDB && iDb==1 ){
116378116388
sqlite3OpenTempDatabase(pToplevel);
@@ -129424,11 +129434,11 @@
129424129434
** PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate
129425129435
**
129426129436
** Checkpoint the database.
129427129437
*/
129428129438
case PragTyp_WAL_CHECKPOINT: {
129429
- int iBt = (pId2->z?iDb:SQLITE_MAX_ATTACHED);
129439
+ int iBt = (pId2->z?iDb:SQLITE_MAX_DB);
129430129440
int eMode = SQLITE_CHECKPOINT_PASSIVE;
129431129441
if( zRight ){
129432129442
if( sqlite3StrICmp(zRight, "full")==0 ){
129433129443
eMode = SQLITE_CHECKPOINT_FULL;
129434129444
}else if( sqlite3StrICmp(zRight, "restart")==0 ){
@@ -166301,11 +166311,11 @@
166301166311
){
166302166312
#ifdef SQLITE_OMIT_WAL
166303166313
return SQLITE_OK;
166304166314
#else
166305166315
int rc; /* Return code */
166306
- int iDb = SQLITE_MAX_ATTACHED; /* sqlite3.aDb[] index of db to checkpoint */
166316
+ int iDb; /* Schema to checkpoint */
166307166317
166308166318
#ifdef SQLITE_ENABLE_API_ARMOR
166309166319
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
166310166320
#endif
166311166321
@@ -166324,10 +166334,12 @@
166324166334
}
166325166335
166326166336
sqlite3_mutex_enter(db->mutex);
166327166337
if( zDb && zDb[0] ){
166328166338
iDb = sqlite3FindDbName(db, zDb);
166339
+ }else{
166340
+ iDb = SQLITE_MAX_DB; /* This means process all schemas */
166329166341
}
166330166342
if( iDb<0 ){
166331166343
rc = SQLITE_ERROR;
166332166344
sqlite3ErrorWithMsg(db, SQLITE_ERROR, "unknown database: %s", zDb);
166333166345
}else{
@@ -166372,11 +166384,11 @@
166372166384
**
166373166385
** The mutex on database handle db should be held by the caller. The mutex
166374166386
** associated with the specific b-tree being checkpointed is taken by
166375166387
** this function while the checkpoint is running.
166376166388
**
166377
-** If iDb is passed SQLITE_MAX_ATTACHED, then all attached databases are
166389
+** If iDb is passed SQLITE_MAX_DB then all attached databases are
166378166390
** checkpointed. If an error is encountered it is returned immediately -
166379166391
** no attempt is made to checkpoint any remaining databases.
166380166392
**
166381166393
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART
166382166394
** or TRUNCATE.
@@ -166387,13 +166399,15 @@
166387166399
int bBusy = 0; /* True if SQLITE_BUSY has been encountered */
166388166400
166389166401
assert( sqlite3_mutex_held(db->mutex) );
166390166402
assert( !pnLog || *pnLog==-1 );
166391166403
assert( !pnCkpt || *pnCkpt==-1 );
166404
+ testcase( iDb==SQLITE_MAX_ATTACHED ); /* See forum post a006d86f72 */
166405
+ testcase( iDb==SQLITE_MAX_DB );
166392166406
166393166407
for(i=0; i<db->nDb && rc==SQLITE_OK; i++){
166394
- if( i==iDb || iDb==SQLITE_MAX_ATTACHED ){
166408
+ if( i==iDb || iDb==SQLITE_MAX_DB ){
166395166409
rc = sqlite3BtreeCheckpoint(db->aDb[i].pBt, eMode, pnLog, pnCkpt);
166396166410
pnLog = 0;
166397166411
pnCkpt = 0;
166398166412
if( rc==SQLITE_BUSY ){
166399166413
bBusy = 1;
@@ -187931,10 +187945,11 @@
187931187945
memset(pCsr, 0, sizeof(unicode_cursor));
187932187946
187933187947
pCsr->aInput = (const unsigned char *)aInput;
187934187948
if( aInput==0 ){
187935187949
pCsr->nInput = 0;
187950
+ pCsr->aInput = (const unsigned char*)"";
187936187951
}else if( nInput<0 ){
187937187952
pCsr->nInput = (int)strlen(aInput);
187938187953
}else{
187939187954
pCsr->nInput = nInput;
187940187955
}
@@ -224510,13 +224525,15 @@
224510224525
static void fts5DoclistIterInit(
224511224526
Fts5Buffer *pBuf,
224512224527
Fts5DoclistIter *pIter
224513224528
){
224514224529
memset(pIter, 0, sizeof(*pIter));
224515
- pIter->aPoslist = pBuf->p;
224516
- pIter->aEof = &pBuf->p[pBuf->n];
224517
- fts5DoclistIterNext(pIter);
224530
+ if( pBuf->n>0 ){
224531
+ pIter->aPoslist = pBuf->p;
224532
+ pIter->aEof = &pBuf->p[pBuf->n];
224533
+ fts5DoclistIterNext(pIter);
224534
+ }
224518224535
}
224519224536
224520224537
#if 0
224521224538
/*
224522224539
** Append a doclist to buffer pBuf.
@@ -225274,12 +225291,13 @@
225274225291
** Return the current term.
225275225292
*/
225276225293
static const char *sqlite3Fts5IterTerm(Fts5IndexIter *pIndexIter, int *pn){
225277225294
int n;
225278225295
const char *z = (const char*)fts5MultiIterTerm((Fts5Iter*)pIndexIter, &n);
225296
+ assert_nc( z || n<=1 );
225279225297
*pn = n-1;
225280
- return &z[1];
225298
+ return (z ? &z[1] : 0);
225281225299
}
225282225300
225283225301
/*
225284225302
** Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery().
225285225303
*/
@@ -228561,11 +228579,12 @@
228561228579
){
228562228580
Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
228563228581
int n;
228564228582
int rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);
228565228583
if( rc==SQLITE_OK ){
228566
- pIter->b = &pIter->a[n];
228584
+ assert( pIter->a || n==0 );
228585
+ pIter->b = (pIter->a ? &pIter->a[n] : 0);
228567228586
*piCol = 0;
228568228587
*piOff = 0;
228569228588
fts5ApiPhraseNext(pCtx, pIter, piCol, piOff);
228570228589
}
228571228590
return rc;
@@ -228620,19 +228639,21 @@
228620228639
pIter->a = &pSorter->aPoslist[i1];
228621228640
}else{
228622228641
rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, iPhrase, &pIter->a, &n);
228623228642
}
228624228643
if( rc==SQLITE_OK ){
228625
- pIter->b = &pIter->a[n];
228644
+ assert( pIter->a || n==0 );
228645
+ pIter->b = (pIter->a ? &pIter->a[n] : 0);
228626228646
*piCol = 0;
228627228647
fts5ApiPhraseNextColumn(pCtx, pIter, piCol);
228628228648
}
228629228649
}else{
228630228650
int n;
228631228651
rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);
228632228652
if( rc==SQLITE_OK ){
228633
- pIter->b = &pIter->a[n];
228653
+ assert( pIter->a || n==0 );
228654
+ pIter->b = (pIter->a ? &pIter->a[n] : 0);
228634228655
if( n<=0 ){
228635228656
*piCol = -1;
228636228657
}else if( pIter->a[0]==0x01 ){
228637228658
pIter->a += 1 + fts5GetVarint32(&pIter->a[1], *piCol);
228638228659
}else{
@@ -229106,11 +229127,11 @@
229106229127
assert( nArg>0 );
229107229128
rc = SQLITE_ERROR;
229108229129
*pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]);
229109229130
}else{
229110229131
rc = pMod->x.xCreate(
229111
- pMod->pUserData, &azArg[1], (nArg?nArg-1:0), &pConfig->pTok
229132
+ pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->pTok
229112229133
);
229113229134
pConfig->pTokApi = &pMod->x;
229114229135
if( rc!=SQLITE_OK ){
229115229136
if( pzErr ) *pzErr = sqlite3_mprintf("error in tokenizer constructor");
229116229137
}else{
@@ -229169,11 +229190,11 @@
229169229190
int nArg, /* Number of args */
229170229191
sqlite3_value **apUnused /* Function arguments */
229171229192
){
229172229193
assert( nArg==0 );
229173229194
UNUSED_PARAM2(nArg, apUnused);
229174
- sqlite3_result_text(pCtx, "fts5: 2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303bf8b", -1, SQLITE_TRANSIENT);
229195
+ sqlite3_result_text(pCtx, "fts5: 2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b", -1, SQLITE_TRANSIENT);
229175229196
}
229176229197
229177229198
/*
229178229199
** Return true if zName is the extension on one of the shadow tables used
229179229200
** by this module.
@@ -234095,12 +234116,12 @@
234095234116
}
234096234117
#endif /* SQLITE_CORE */
234097234118
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
234098234119
234099234120
/************** End of stmt.c ************************************************/
234100
-#if __LINE__!=234100
234121
+#if __LINE__!=234121
234101234122
#undef SQLITE_SOURCE_ID
234102
-#define SQLITE_SOURCE_ID "2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303alt2"
234123
+#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115alt2"
234103234124
#endif
234104234125
/* Return the source-id for this library */
234105234126
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
234106234127
/************************** End of sqlite3.c ******************************/
234107234128
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1186,11 +1186,11 @@
1186 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1187 ** [sqlite_version()] and [sqlite_source_id()].
1188 */
1189 #define SQLITE_VERSION "3.35.0"
1190 #define SQLITE_VERSION_NUMBER 3035000
1191 #define SQLITE_SOURCE_ID "2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303bf8b"
1192
1193 /*
1194 ** CAPI3REF: Run-Time Library Version Numbers
1195 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1196 **
@@ -11623,22 +11623,27 @@
11623 ** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
11624 ** created by [sqlite3changeset_start()]. In the latter case, the most recent
11625 ** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
11626 ** is not the case, this function returns [SQLITE_MISUSE].
11627 **
11628 ** If argument pzTab is not NULL, then *pzTab is set to point to a
11629 ** nul-terminated utf-8 encoded string containing the name of the table
11630 ** affected by the current change. The buffer remains valid until either
11631 ** sqlite3changeset_next() is called on the iterator or until the
11632 ** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
11633 ** set to the number of columns in the table affected by the change. If
11634 ** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
 
 
 
 
 
 
 
11635 ** is an indirect change, or false (0) otherwise. See the documentation for
11636 ** [sqlite3session_indirect()] for a description of direct and indirect
11637 ** changes. Finally, if pOp is not NULL, then *pOp is set to one of
11638 ** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the
11639 ** type of change that the iterator currently points to.
11640 **
11641 ** If no error occurs, SQLITE_OK is returned. If an error does occur, an
11642 ** SQLite error code is returned. The values of the output variables may not
11643 ** be trusted in this case.
11644 */
@@ -16948,10 +16953,15 @@
16948 #define SQLITE_TRACE_LEGACY 0
16949 #define SQLITE_TRACE_XPROFILE 0
16950 #endif /* SQLITE_OMIT_DEPRECATED */
16951 #define SQLITE_TRACE_NONLEGACY_MASK 0x0f /* Normal flags */
16952
 
 
 
 
 
16953
16954 /*
16955 ** Each database connection is an instance of the following structure.
16956 */
16957 struct sqlite3 {
@@ -103196,11 +103206,11 @@
103196 assert( p->pSrc!=0 ); /* Because of isCandidateForInOpt(p) */
103197 pTab = p->pSrc->a[0].pTab;
103198
103199 /* Code an OP_Transaction and OP_TableLock for <table>. */
103200 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
103201 assert( iDb>=0 && iDb<SQLITE_MAX_ATTACHED );
103202 sqlite3CodeVerifySchema(pParse, iDb);
103203 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
103204
103205 assert(v); /* sqlite3GetVdbe() has always been previously called */
103206 if( nExpr==1 && pEList->a[0].pExpr->iColumn<0 ){
@@ -116368,11 +116378,11 @@
116368 ** later, by sqlite3FinishCoding().
116369 */
116370 static void sqlite3CodeVerifySchemaAtToplevel(Parse *pToplevel, int iDb){
116371 assert( iDb>=0 && iDb<pToplevel->db->nDb );
116372 assert( pToplevel->db->aDb[iDb].pBt!=0 || iDb==1 );
116373 assert( iDb<SQLITE_MAX_ATTACHED+2 );
116374 assert( sqlite3SchemaMutexHeld(pToplevel->db, iDb, 0) );
116375 if( DbMaskTest(pToplevel->cookieMask, iDb)==0 ){
116376 DbMaskSet(pToplevel->cookieMask, iDb);
116377 if( !OMIT_TEMPDB && iDb==1 ){
116378 sqlite3OpenTempDatabase(pToplevel);
@@ -129424,11 +129434,11 @@
129424 ** PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate
129425 **
129426 ** Checkpoint the database.
129427 */
129428 case PragTyp_WAL_CHECKPOINT: {
129429 int iBt = (pId2->z?iDb:SQLITE_MAX_ATTACHED);
129430 int eMode = SQLITE_CHECKPOINT_PASSIVE;
129431 if( zRight ){
129432 if( sqlite3StrICmp(zRight, "full")==0 ){
129433 eMode = SQLITE_CHECKPOINT_FULL;
129434 }else if( sqlite3StrICmp(zRight, "restart")==0 ){
@@ -166301,11 +166311,11 @@
166301 ){
166302 #ifdef SQLITE_OMIT_WAL
166303 return SQLITE_OK;
166304 #else
166305 int rc; /* Return code */
166306 int iDb = SQLITE_MAX_ATTACHED; /* sqlite3.aDb[] index of db to checkpoint */
166307
166308 #ifdef SQLITE_ENABLE_API_ARMOR
166309 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
166310 #endif
166311
@@ -166324,10 +166334,12 @@
166324 }
166325
166326 sqlite3_mutex_enter(db->mutex);
166327 if( zDb && zDb[0] ){
166328 iDb = sqlite3FindDbName(db, zDb);
 
 
166329 }
166330 if( iDb<0 ){
166331 rc = SQLITE_ERROR;
166332 sqlite3ErrorWithMsg(db, SQLITE_ERROR, "unknown database: %s", zDb);
166333 }else{
@@ -166372,11 +166384,11 @@
166372 **
166373 ** The mutex on database handle db should be held by the caller. The mutex
166374 ** associated with the specific b-tree being checkpointed is taken by
166375 ** this function while the checkpoint is running.
166376 **
166377 ** If iDb is passed SQLITE_MAX_ATTACHED, then all attached databases are
166378 ** checkpointed. If an error is encountered it is returned immediately -
166379 ** no attempt is made to checkpoint any remaining databases.
166380 **
166381 ** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART
166382 ** or TRUNCATE.
@@ -166387,13 +166399,15 @@
166387 int bBusy = 0; /* True if SQLITE_BUSY has been encountered */
166388
166389 assert( sqlite3_mutex_held(db->mutex) );
166390 assert( !pnLog || *pnLog==-1 );
166391 assert( !pnCkpt || *pnCkpt==-1 );
 
 
166392
166393 for(i=0; i<db->nDb && rc==SQLITE_OK; i++){
166394 if( i==iDb || iDb==SQLITE_MAX_ATTACHED ){
166395 rc = sqlite3BtreeCheckpoint(db->aDb[i].pBt, eMode, pnLog, pnCkpt);
166396 pnLog = 0;
166397 pnCkpt = 0;
166398 if( rc==SQLITE_BUSY ){
166399 bBusy = 1;
@@ -187931,10 +187945,11 @@
187931 memset(pCsr, 0, sizeof(unicode_cursor));
187932
187933 pCsr->aInput = (const unsigned char *)aInput;
187934 if( aInput==0 ){
187935 pCsr->nInput = 0;
 
187936 }else if( nInput<0 ){
187937 pCsr->nInput = (int)strlen(aInput);
187938 }else{
187939 pCsr->nInput = nInput;
187940 }
@@ -224510,13 +224525,15 @@
224510 static void fts5DoclistIterInit(
224511 Fts5Buffer *pBuf,
224512 Fts5DoclistIter *pIter
224513 ){
224514 memset(pIter, 0, sizeof(*pIter));
224515 pIter->aPoslist = pBuf->p;
224516 pIter->aEof = &pBuf->p[pBuf->n];
224517 fts5DoclistIterNext(pIter);
 
 
224518 }
224519
224520 #if 0
224521 /*
224522 ** Append a doclist to buffer pBuf.
@@ -225274,12 +225291,13 @@
225274 ** Return the current term.
225275 */
225276 static const char *sqlite3Fts5IterTerm(Fts5IndexIter *pIndexIter, int *pn){
225277 int n;
225278 const char *z = (const char*)fts5MultiIterTerm((Fts5Iter*)pIndexIter, &n);
 
225279 *pn = n-1;
225280 return &z[1];
225281 }
225282
225283 /*
225284 ** Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery().
225285 */
@@ -228561,11 +228579,12 @@
228561 ){
228562 Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
228563 int n;
228564 int rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);
228565 if( rc==SQLITE_OK ){
228566 pIter->b = &pIter->a[n];
 
228567 *piCol = 0;
228568 *piOff = 0;
228569 fts5ApiPhraseNext(pCtx, pIter, piCol, piOff);
228570 }
228571 return rc;
@@ -228620,19 +228639,21 @@
228620 pIter->a = &pSorter->aPoslist[i1];
228621 }else{
228622 rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, iPhrase, &pIter->a, &n);
228623 }
228624 if( rc==SQLITE_OK ){
228625 pIter->b = &pIter->a[n];
 
228626 *piCol = 0;
228627 fts5ApiPhraseNextColumn(pCtx, pIter, piCol);
228628 }
228629 }else{
228630 int n;
228631 rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);
228632 if( rc==SQLITE_OK ){
228633 pIter->b = &pIter->a[n];
 
228634 if( n<=0 ){
228635 *piCol = -1;
228636 }else if( pIter->a[0]==0x01 ){
228637 pIter->a += 1 + fts5GetVarint32(&pIter->a[1], *piCol);
228638 }else{
@@ -229106,11 +229127,11 @@
229106 assert( nArg>0 );
229107 rc = SQLITE_ERROR;
229108 *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]);
229109 }else{
229110 rc = pMod->x.xCreate(
229111 pMod->pUserData, &azArg[1], (nArg?nArg-1:0), &pConfig->pTok
229112 );
229113 pConfig->pTokApi = &pMod->x;
229114 if( rc!=SQLITE_OK ){
229115 if( pzErr ) *pzErr = sqlite3_mprintf("error in tokenizer constructor");
229116 }else{
@@ -229169,11 +229190,11 @@
229169 int nArg, /* Number of args */
229170 sqlite3_value **apUnused /* Function arguments */
229171 ){
229172 assert( nArg==0 );
229173 UNUSED_PARAM2(nArg, apUnused);
229174 sqlite3_result_text(pCtx, "fts5: 2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303bf8b", -1, SQLITE_TRANSIENT);
229175 }
229176
229177 /*
229178 ** Return true if zName is the extension on one of the shadow tables used
229179 ** by this module.
@@ -234095,12 +234116,12 @@
234095 }
234096 #endif /* SQLITE_CORE */
234097 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
234098
234099 /************** End of stmt.c ************************************************/
234100 #if __LINE__!=234100
234101 #undef SQLITE_SOURCE_ID
234102 #define SQLITE_SOURCE_ID "2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303alt2"
234103 #endif
234104 /* Return the source-id for this library */
234105 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
234106 /************************** End of sqlite3.c ******************************/
234107
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1186,11 +1186,11 @@
1186 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1187 ** [sqlite_version()] and [sqlite_source_id()].
1188 */
1189 #define SQLITE_VERSION "3.35.0"
1190 #define SQLITE_VERSION_NUMBER 3035000
1191 #define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
1192
1193 /*
1194 ** CAPI3REF: Run-Time Library Version Numbers
1195 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1196 **
@@ -11623,22 +11623,27 @@
11623 ** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
11624 ** created by [sqlite3changeset_start()]. In the latter case, the most recent
11625 ** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
11626 ** is not the case, this function returns [SQLITE_MISUSE].
11627 **
11628 ** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three
11629 ** outputs are set through these pointers:
11630 **
11631 ** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
11632 ** depending on the type of change that the iterator currently points to;
11633 **
11634 ** *pnCol is set to the number of columns in the table affected by the change; and
11635 **
11636 ** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
11637 ** the name of the table affected by the current change. The buffer remains
11638 ** valid until either sqlite3changeset_next() is called on the iterator
11639 ** or until the conflict-handler function returns.
11640 **
11641 ** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
11642 ** is an indirect change, or false (0) otherwise. See the documentation for
11643 ** [sqlite3session_indirect()] for a description of direct and indirect
11644 ** changes.
 
 
11645 **
11646 ** If no error occurs, SQLITE_OK is returned. If an error does occur, an
11647 ** SQLite error code is returned. The values of the output variables may not
11648 ** be trusted in this case.
11649 */
@@ -16948,10 +16953,15 @@
16953 #define SQLITE_TRACE_LEGACY 0
16954 #define SQLITE_TRACE_XPROFILE 0
16955 #endif /* SQLITE_OMIT_DEPRECATED */
16956 #define SQLITE_TRACE_NONLEGACY_MASK 0x0f /* Normal flags */
16957
16958 /*
16959 ** Maximum number of sqlite3.aDb[] entries. This is the number of attached
16960 ** databases plus 2 for "main" and "temp".
16961 */
16962 #define SQLITE_MAX_DB (SQLITE_MAX_ATTACHED+2)
16963
16964 /*
16965 ** Each database connection is an instance of the following structure.
16966 */
16967 struct sqlite3 {
@@ -103196,11 +103206,11 @@
103206 assert( p->pSrc!=0 ); /* Because of isCandidateForInOpt(p) */
103207 pTab = p->pSrc->a[0].pTab;
103208
103209 /* Code an OP_Transaction and OP_TableLock for <table>. */
103210 iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
103211 assert( iDb>=0 && iDb<SQLITE_MAX_DB );
103212 sqlite3CodeVerifySchema(pParse, iDb);
103213 sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
103214
103215 assert(v); /* sqlite3GetVdbe() has always been previously called */
103216 if( nExpr==1 && pEList->a[0].pExpr->iColumn<0 ){
@@ -116368,11 +116378,11 @@
116378 ** later, by sqlite3FinishCoding().
116379 */
116380 static void sqlite3CodeVerifySchemaAtToplevel(Parse *pToplevel, int iDb){
116381 assert( iDb>=0 && iDb<pToplevel->db->nDb );
116382 assert( pToplevel->db->aDb[iDb].pBt!=0 || iDb==1 );
116383 assert( iDb<SQLITE_MAX_DB );
116384 assert( sqlite3SchemaMutexHeld(pToplevel->db, iDb, 0) );
116385 if( DbMaskTest(pToplevel->cookieMask, iDb)==0 ){
116386 DbMaskSet(pToplevel->cookieMask, iDb);
116387 if( !OMIT_TEMPDB && iDb==1 ){
116388 sqlite3OpenTempDatabase(pToplevel);
@@ -129424,11 +129434,11 @@
129434 ** PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate
129435 **
129436 ** Checkpoint the database.
129437 */
129438 case PragTyp_WAL_CHECKPOINT: {
129439 int iBt = (pId2->z?iDb:SQLITE_MAX_DB);
129440 int eMode = SQLITE_CHECKPOINT_PASSIVE;
129441 if( zRight ){
129442 if( sqlite3StrICmp(zRight, "full")==0 ){
129443 eMode = SQLITE_CHECKPOINT_FULL;
129444 }else if( sqlite3StrICmp(zRight, "restart")==0 ){
@@ -166301,11 +166311,11 @@
166311 ){
166312 #ifdef SQLITE_OMIT_WAL
166313 return SQLITE_OK;
166314 #else
166315 int rc; /* Return code */
166316 int iDb; /* Schema to checkpoint */
166317
166318 #ifdef SQLITE_ENABLE_API_ARMOR
166319 if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
166320 #endif
166321
@@ -166324,10 +166334,12 @@
166334 }
166335
166336 sqlite3_mutex_enter(db->mutex);
166337 if( zDb && zDb[0] ){
166338 iDb = sqlite3FindDbName(db, zDb);
166339 }else{
166340 iDb = SQLITE_MAX_DB; /* This means process all schemas */
166341 }
166342 if( iDb<0 ){
166343 rc = SQLITE_ERROR;
166344 sqlite3ErrorWithMsg(db, SQLITE_ERROR, "unknown database: %s", zDb);
166345 }else{
@@ -166372,11 +166384,11 @@
166384 **
166385 ** The mutex on database handle db should be held by the caller. The mutex
166386 ** associated with the specific b-tree being checkpointed is taken by
166387 ** this function while the checkpoint is running.
166388 **
166389 ** If iDb is passed SQLITE_MAX_DB then all attached databases are
166390 ** checkpointed. If an error is encountered it is returned immediately -
166391 ** no attempt is made to checkpoint any remaining databases.
166392 **
166393 ** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART
166394 ** or TRUNCATE.
@@ -166387,13 +166399,15 @@
166399 int bBusy = 0; /* True if SQLITE_BUSY has been encountered */
166400
166401 assert( sqlite3_mutex_held(db->mutex) );
166402 assert( !pnLog || *pnLog==-1 );
166403 assert( !pnCkpt || *pnCkpt==-1 );
166404 testcase( iDb==SQLITE_MAX_ATTACHED ); /* See forum post a006d86f72 */
166405 testcase( iDb==SQLITE_MAX_DB );
166406
166407 for(i=0; i<db->nDb && rc==SQLITE_OK; i++){
166408 if( i==iDb || iDb==SQLITE_MAX_DB ){
166409 rc = sqlite3BtreeCheckpoint(db->aDb[i].pBt, eMode, pnLog, pnCkpt);
166410 pnLog = 0;
166411 pnCkpt = 0;
166412 if( rc==SQLITE_BUSY ){
166413 bBusy = 1;
@@ -187931,10 +187945,11 @@
187945 memset(pCsr, 0, sizeof(unicode_cursor));
187946
187947 pCsr->aInput = (const unsigned char *)aInput;
187948 if( aInput==0 ){
187949 pCsr->nInput = 0;
187950 pCsr->aInput = (const unsigned char*)"";
187951 }else if( nInput<0 ){
187952 pCsr->nInput = (int)strlen(aInput);
187953 }else{
187954 pCsr->nInput = nInput;
187955 }
@@ -224510,13 +224525,15 @@
224525 static void fts5DoclistIterInit(
224526 Fts5Buffer *pBuf,
224527 Fts5DoclistIter *pIter
224528 ){
224529 memset(pIter, 0, sizeof(*pIter));
224530 if( pBuf->n>0 ){
224531 pIter->aPoslist = pBuf->p;
224532 pIter->aEof = &pBuf->p[pBuf->n];
224533 fts5DoclistIterNext(pIter);
224534 }
224535 }
224536
224537 #if 0
224538 /*
224539 ** Append a doclist to buffer pBuf.
@@ -225274,12 +225291,13 @@
225291 ** Return the current term.
225292 */
225293 static const char *sqlite3Fts5IterTerm(Fts5IndexIter *pIndexIter, int *pn){
225294 int n;
225295 const char *z = (const char*)fts5MultiIterTerm((Fts5Iter*)pIndexIter, &n);
225296 assert_nc( z || n<=1 );
225297 *pn = n-1;
225298 return (z ? &z[1] : 0);
225299 }
225300
225301 /*
225302 ** Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery().
225303 */
@@ -228561,11 +228579,12 @@
228579 ){
228580 Fts5Cursor *pCsr = (Fts5Cursor*)pCtx;
228581 int n;
228582 int rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);
228583 if( rc==SQLITE_OK ){
228584 assert( pIter->a || n==0 );
228585 pIter->b = (pIter->a ? &pIter->a[n] : 0);
228586 *piCol = 0;
228587 *piOff = 0;
228588 fts5ApiPhraseNext(pCtx, pIter, piCol, piOff);
228589 }
228590 return rc;
@@ -228620,19 +228639,21 @@
228639 pIter->a = &pSorter->aPoslist[i1];
228640 }else{
228641 rc = sqlite3Fts5ExprPhraseCollist(pCsr->pExpr, iPhrase, &pIter->a, &n);
228642 }
228643 if( rc==SQLITE_OK ){
228644 assert( pIter->a || n==0 );
228645 pIter->b = (pIter->a ? &pIter->a[n] : 0);
228646 *piCol = 0;
228647 fts5ApiPhraseNextColumn(pCtx, pIter, piCol);
228648 }
228649 }else{
228650 int n;
228651 rc = fts5CsrPoslist(pCsr, iPhrase, &pIter->a, &n);
228652 if( rc==SQLITE_OK ){
228653 assert( pIter->a || n==0 );
228654 pIter->b = (pIter->a ? &pIter->a[n] : 0);
228655 if( n<=0 ){
228656 *piCol = -1;
228657 }else if( pIter->a[0]==0x01 ){
228658 pIter->a += 1 + fts5GetVarint32(&pIter->a[1], *piCol);
228659 }else{
@@ -229106,11 +229127,11 @@
229127 assert( nArg>0 );
229128 rc = SQLITE_ERROR;
229129 *pzErr = sqlite3_mprintf("no such tokenizer: %s", azArg[0]);
229130 }else{
229131 rc = pMod->x.xCreate(
229132 pMod->pUserData, (azArg?&azArg[1]:0), (nArg?nArg-1:0), &pConfig->pTok
229133 );
229134 pConfig->pTokApi = &pMod->x;
229135 if( rc!=SQLITE_OK ){
229136 if( pzErr ) *pzErr = sqlite3_mprintf("error in tokenizer constructor");
229137 }else{
@@ -229169,11 +229190,11 @@
229190 int nArg, /* Number of args */
229191 sqlite3_value **apUnused /* Function arguments */
229192 ){
229193 assert( nArg==0 );
229194 UNUSED_PARAM2(nArg, apUnused);
229195 sqlite3_result_text(pCtx, "fts5: 2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b", -1, SQLITE_TRANSIENT);
229196 }
229197
229198 /*
229199 ** Return true if zName is the extension on one of the shadow tables used
229200 ** by this module.
@@ -234095,12 +234116,12 @@
234116 }
234117 #endif /* SQLITE_CORE */
234118 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
234119
234120 /************** End of stmt.c ************************************************/
234121 #if __LINE__!=234121
234122 #undef SQLITE_SOURCE_ID
234123 #define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115alt2"
234124 #endif
234125 /* Return the source-id for this library */
234126 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
234127 /************************** End of sqlite3.c ******************************/
234128
+16 -11
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123123
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124124
** [sqlite_version()] and [sqlite_source_id()].
125125
*/
126126
#define SQLITE_VERSION "3.35.0"
127127
#define SQLITE_VERSION_NUMBER 3035000
128
-#define SQLITE_SOURCE_ID "2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303bf8b"
128
+#define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
@@ -10560,22 +10560,27 @@
1056010560
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
1056110561
** created by [sqlite3changeset_start()]. In the latter case, the most recent
1056210562
** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
1056310563
** is not the case, this function returns [SQLITE_MISUSE].
1056410564
**
10565
-** If argument pzTab is not NULL, then *pzTab is set to point to a
10566
-** nul-terminated utf-8 encoded string containing the name of the table
10567
-** affected by the current change. The buffer remains valid until either
10568
-** sqlite3changeset_next() is called on the iterator or until the
10569
-** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
10570
-** set to the number of columns in the table affected by the change. If
10571
-** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
10565
+** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three
10566
+** outputs are set through these pointers:
10567
+**
10568
+** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
10569
+** depending on the type of change that the iterator currently points to;
10570
+**
10571
+** *pnCol is set to the number of columns in the table affected by the change; and
10572
+**
10573
+** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
10574
+** the name of the table affected by the current change. The buffer remains
10575
+** valid until either sqlite3changeset_next() is called on the iterator
10576
+** or until the conflict-handler function returns.
10577
+**
10578
+** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
1057210579
** is an indirect change, or false (0) otherwise. See the documentation for
1057310580
** [sqlite3session_indirect()] for a description of direct and indirect
10574
-** changes. Finally, if pOp is not NULL, then *pOp is set to one of
10575
-** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the
10576
-** type of change that the iterator currently points to.
10581
+** changes.
1057710582
**
1057810583
** If no error occurs, SQLITE_OK is returned. If an error does occur, an
1057910584
** SQLite error code is returned. The values of the output variables may not
1058010585
** be trusted in this case.
1058110586
*/
1058210587
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.35.0"
127 #define SQLITE_VERSION_NUMBER 3035000
128 #define SQLITE_SOURCE_ID "2021-03-09 21:20:12 9645fe1a050e8b61aea1fba2f142819c387ecb043741392c5719bf7ad303bf8b"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -10560,22 +10560,27 @@
10560 ** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
10561 ** created by [sqlite3changeset_start()]. In the latter case, the most recent
10562 ** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
10563 ** is not the case, this function returns [SQLITE_MISUSE].
10564 **
10565 ** If argument pzTab is not NULL, then *pzTab is set to point to a
10566 ** nul-terminated utf-8 encoded string containing the name of the table
10567 ** affected by the current change. The buffer remains valid until either
10568 ** sqlite3changeset_next() is called on the iterator or until the
10569 ** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
10570 ** set to the number of columns in the table affected by the change. If
10571 ** pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
 
 
 
 
 
 
 
10572 ** is an indirect change, or false (0) otherwise. See the documentation for
10573 ** [sqlite3session_indirect()] for a description of direct and indirect
10574 ** changes. Finally, if pOp is not NULL, then *pOp is set to one of
10575 ** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the
10576 ** type of change that the iterator currently points to.
10577 **
10578 ** If no error occurs, SQLITE_OK is returned. If an error does occur, an
10579 ** SQLite error code is returned. The values of the output variables may not
10580 ** be trusted in this case.
10581 */
10582
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -123,11 +123,11 @@
123 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
124 ** [sqlite_version()] and [sqlite_source_id()].
125 */
126 #define SQLITE_VERSION "3.35.0"
127 #define SQLITE_VERSION_NUMBER 3035000
128 #define SQLITE_SOURCE_ID "2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
@@ -10560,22 +10560,27 @@
10560 ** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
10561 ** created by [sqlite3changeset_start()]. In the latter case, the most recent
10562 ** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
10563 ** is not the case, this function returns [SQLITE_MISUSE].
10564 **
10565 ** Arguments pOp, pnCol and pzTab may not be NULL. Upon return, three
10566 ** outputs are set through these pointers:
10567 **
10568 ** *pOp is set to one of [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE],
10569 ** depending on the type of change that the iterator currently points to;
10570 **
10571 ** *pnCol is set to the number of columns in the table affected by the change; and
10572 **
10573 ** *pzTab is set to point to a nul-terminated utf-8 encoded string containing
10574 ** the name of the table affected by the current change. The buffer remains
10575 ** valid until either sqlite3changeset_next() is called on the iterator
10576 ** or until the conflict-handler function returns.
10577 **
10578 ** If pbIndirect is not NULL, then *pbIndirect is set to true (1) if the change
10579 ** is an indirect change, or false (0) otherwise. See the documentation for
10580 ** [sqlite3session_indirect()] for a description of direct and indirect
10581 ** changes.
 
 
10582 **
10583 ** If no error occurs, SQLITE_OK is returned. If an error does occur, an
10584 ** SQLite error code is returned. The values of the output variables may not
10585 ** be trusted in this case.
10586 */
10587

Keyboard Shortcuts

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