Fossil SCM

Update the built-in SQLite with the patch to support the IIF() function.

drh 2020-05-13 18:49 trunk
Commit 6fa4d92e6a51b7291b866750d5c30be811f07fccbde44d9ae592dd4ad55c9679
2 files changed +31 -16 +1 -1
+31 -16
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
11621162
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
11631163
** [sqlite_version()] and [sqlite_source_id()].
11641164
*/
11651165
#define SQLITE_VERSION "3.32.0"
11661166
#define SQLITE_VERSION_NUMBER 3032000
1167
-#define SQLITE_SOURCE_ID "2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff"
1167
+#define SQLITE_SOURCE_ID "2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a"
11681168
11691169
/*
11701170
** CAPI3REF: Run-Time Library Version Numbers
11711171
** KEYWORDS: sqlite3_version sqlite3_sourceid
11721172
**
@@ -17119,11 +17119,11 @@
1711917119
#define SQLITE_FUNC_EPHEM 0x0010 /* Ephemeral. Delete with VDBE */
1712017120
#define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/
1712117121
#define SQLITE_FUNC_LENGTH 0x0040 /* Built-in length() function */
1712217122
#define SQLITE_FUNC_TYPEOF 0x0080 /* Built-in typeof() function */
1712317123
#define SQLITE_FUNC_COUNT 0x0100 /* Built-in count(*) aggregate */
17124
-#define SQLITE_FUNC_COALESCE 0x0200 /* Built-in coalesce() or ifnull() */
17124
+/* 0x0200 -- available for reuse */
1712517125
#define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */
1712617126
#define SQLITE_FUNC_CONSTANT 0x0800 /* Constant inputs give a constant output */
1712717127
#define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
1712817128
#define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
1712917129
** single query - might change over time */
@@ -17140,10 +17140,11 @@
1714017140
#define INLINEFUNC_coalesce 0
1714117141
#define INLINEFUNC_implies_nonnull_row 1
1714217142
#define INLINEFUNC_expr_implies_expr 2
1714317143
#define INLINEFUNC_expr_compare 3
1714417144
#define INLINEFUNC_affinity 4
17145
+#define INLINEFUNC_iif 5
1714517146
#define INLINEFUNC_unlikely 99 /* Default case */
1714617147
1714717148
/*
1714817149
** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
1714917150
** used to create the initializers for the FuncDef structures.
@@ -61074,11 +61075,11 @@
6107461075
pWal->nCkpt++;
6107561076
pWal->hdr.mxFrame = 0;
6107661077
sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
6107761078
memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
6107861079
walIndexWriteHdr(pWal);
61079
- pInfo->nBackfill = 0;
61080
+ AtomicStore(&pInfo->nBackfill, 0);
6108061081
pInfo->nBackfillAttempted = 0;
6108161082
pInfo->aReadMark[1] = 0;
6108261083
for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
6108361084
assert( pInfo->aReadMark[0]==0 );
6108461085
}
@@ -61248,11 +61249,11 @@
6124861249
if( rc==SQLITE_OK ){
6124961250
rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));
6125061251
}
6125161252
}
6125261253
if( rc==SQLITE_OK ){
61253
- pInfo->nBackfill = mxSafeFrame;
61254
+ AtomicStore(&pInfo->nBackfill, mxSafeFrame);
6125461255
}
6125561256
}
6125661257
6125761258
/* Release the reader lock held while backfilling */
6125861259
walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
@@ -61871,11 +61872,11 @@
6187161872
}
6187261873
6187361874
assert( pWal->nWiData>0 );
6187461875
assert( pWal->apWiData[0]!=0 );
6187561876
pInfo = walCkptInfo(pWal);
61876
- if( !useWal && pInfo->nBackfill==pWal->hdr.mxFrame
61877
+ if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame
6187761878
#ifdef SQLITE_ENABLE_SNAPSHOT
6187861879
&& (pWal->pSnapshot==0 || pWal->hdr.mxFrame==0)
6187961880
#endif
6188061881
){
6188161882
/* The WAL has been completely backfilled (or it is empty).
@@ -62038,11 +62039,11 @@
6203862039
void *pBuf2 = sqlite3_malloc(szPage);
6203962040
if( pBuf1==0 || pBuf2==0 ){
6204062041
rc = SQLITE_NOMEM;
6204162042
}else{
6204262043
u32 i = pInfo->nBackfillAttempted;
62043
- for(i=pInfo->nBackfillAttempted; i>pInfo->nBackfill; i--){
62044
+ for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){
6204462045
WalHashLoc sLoc; /* Hash table location */
6204562046
u32 pgno; /* Page number in db file */
6204662047
i64 iDbOff; /* Offset of db file entry */
6204762048
i64 iWalOff; /* Offset of wal file entry */
6204862049
@@ -103075,10 +103076,17 @@
103075103076
}
103076103077
setDoNotMergeFlagOnCopy(v);
103077103078
sqlite3VdbeResolveLabel(v, endCoalesce);
103078103079
break;
103079103080
}
103081
+ case INLINEFUNC_iif: {
103082
+ Expr caseExpr;
103083
+ memset(&caseExpr, 0, sizeof(caseExpr));
103084
+ caseExpr.op = TK_CASE;
103085
+ caseExpr.x.pList = pFarg;
103086
+ return sqlite3ExprCodeTarget(pParse, &caseExpr, target);
103087
+ }
103080103088
103081103089
default: {
103082103090
/* The UNLIKELY() function is a no-op. The result is the value
103083103091
** of the first argument.
103084103092
*/
@@ -118477,11 +118485,11 @@
118477118485
FUNCTION(round, 2, 0, 0, roundFunc ),
118478118486
#endif
118479118487
FUNCTION(upper, 1, 0, 0, upperFunc ),
118480118488
FUNCTION(lower, 1, 0, 0, lowerFunc ),
118481118489
FUNCTION(hex, 1, 0, 0, hexFunc ),
118482
- INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, SQLITE_FUNC_COALESCE),
118490
+ INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, 0 ),
118483118491
VFUNCTION(random, 0, 0, 0, randomFunc ),
118484118492
VFUNCTION(randomblob, 1, 0, 0, randomBlob ),
118485118493
FUNCTION(nullif, 2, 0, 1, nullifFunc ),
118486118494
DFUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
118487118495
DFUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
@@ -118517,11 +118525,12 @@
118517118525
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
118518118526
FUNCTION(unknown, -1, 0, 0, unknownFunc ),
118519118527
#endif
118520118528
FUNCTION(coalesce, 1, 0, 0, 0 ),
118521118529
FUNCTION(coalesce, 0, 0, 0, 0 ),
118522
- INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, SQLITE_FUNC_COALESCE),
118530
+ INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, 0 ),
118531
+ INLINE_FUNC(iif, 3, INLINEFUNC_iif, 0 ),
118523118532
};
118524118533
#ifndef SQLITE_OMIT_ALTERTABLE
118525118534
sqlite3AlterFunctions();
118526118535
#endif
118527118536
sqlite3WindowFunctions();
@@ -151130,17 +151139,23 @@
151130151139
){
151131151140
if( pAppend ){
151132151141
int i;
151133151142
int nInit = pList ? pList->nExpr : 0;
151134151143
for(i=0; i<pAppend->nExpr; i++){
151135
- int iDummy;
151136151144
Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
151137151145
assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
151138
- if( bIntToNull && pDup && sqlite3ExprIsInteger(pDup, &iDummy) ){
151139
- pDup->op = TK_NULL;
151140
- pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
151141
- pDup->u.zToken = 0;
151146
+ if( bIntToNull && pDup ){
151147
+ int iDummy;
151148
+ Expr *pSub;
151149
+ for(pSub=pDup; ExprHasProperty(pSub, EP_Skip); pSub=pSub->pLeft){
151150
+ assert( pSub );
151151
+ }
151152
+ if( sqlite3ExprIsInteger(pSub, &iDummy) ){
151153
+ pSub->op = TK_NULL;
151154
+ pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
151155
+ pSub->u.zToken = 0;
151156
+ }
151142151157
}
151143151158
pList = sqlite3ExprListAppend(pParse, pList, pDup);
151144151159
if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
151145151160
}
151146151161
}
@@ -224664,11 +224679,11 @@
224664224679
int nArg, /* Number of args */
224665224680
sqlite3_value **apUnused /* Function arguments */
224666224681
){
224667224682
assert( nArg==0 );
224668224683
UNUSED_PARAM2(nArg, apUnused);
224669
- sqlite3_result_text(pCtx, "fts5: 2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff", -1, SQLITE_TRANSIENT);
224684
+ sqlite3_result_text(pCtx, "fts5: 2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a", -1, SQLITE_TRANSIENT);
224670224685
}
224671224686
224672224687
/*
224673224688
** Return true if zName is the extension on one of the shadow tables used
224674224689
** by this module.
@@ -229447,12 +229462,12 @@
229447229462
}
229448229463
#endif /* SQLITE_CORE */
229449229464
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
229450229465
229451229466
/************** End of stmt.c ************************************************/
229452
-#if __LINE__!=229452
229467
+#if __LINE__!=229467
229453229468
#undef SQLITE_SOURCE_ID
229454
-#define SQLITE_SOURCE_ID "2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f96alt2"
229469
+#define SQLITE_SOURCE_ID "2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88alt2"
229455229470
#endif
229456229471
/* Return the source-id for this library */
229457229472
SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
229458229473
/************************** End of sqlite3.c ******************************/
229459229474
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.32.0"
1166 #define SQLITE_VERSION_NUMBER 3032000
1167 #define SQLITE_SOURCE_ID "2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -17119,11 +17119,11 @@
17119 #define SQLITE_FUNC_EPHEM 0x0010 /* Ephemeral. Delete with VDBE */
17120 #define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/
17121 #define SQLITE_FUNC_LENGTH 0x0040 /* Built-in length() function */
17122 #define SQLITE_FUNC_TYPEOF 0x0080 /* Built-in typeof() function */
17123 #define SQLITE_FUNC_COUNT 0x0100 /* Built-in count(*) aggregate */
17124 #define SQLITE_FUNC_COALESCE 0x0200 /* Built-in coalesce() or ifnull() */
17125 #define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */
17126 #define SQLITE_FUNC_CONSTANT 0x0800 /* Constant inputs give a constant output */
17127 #define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
17128 #define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
17129 ** single query - might change over time */
@@ -17140,10 +17140,11 @@
17140 #define INLINEFUNC_coalesce 0
17141 #define INLINEFUNC_implies_nonnull_row 1
17142 #define INLINEFUNC_expr_implies_expr 2
17143 #define INLINEFUNC_expr_compare 3
17144 #define INLINEFUNC_affinity 4
 
17145 #define INLINEFUNC_unlikely 99 /* Default case */
17146
17147 /*
17148 ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
17149 ** used to create the initializers for the FuncDef structures.
@@ -61074,11 +61075,11 @@
61074 pWal->nCkpt++;
61075 pWal->hdr.mxFrame = 0;
61076 sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
61077 memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
61078 walIndexWriteHdr(pWal);
61079 pInfo->nBackfill = 0;
61080 pInfo->nBackfillAttempted = 0;
61081 pInfo->aReadMark[1] = 0;
61082 for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
61083 assert( pInfo->aReadMark[0]==0 );
61084 }
@@ -61248,11 +61249,11 @@
61248 if( rc==SQLITE_OK ){
61249 rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));
61250 }
61251 }
61252 if( rc==SQLITE_OK ){
61253 pInfo->nBackfill = mxSafeFrame;
61254 }
61255 }
61256
61257 /* Release the reader lock held while backfilling */
61258 walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
@@ -61871,11 +61872,11 @@
61871 }
61872
61873 assert( pWal->nWiData>0 );
61874 assert( pWal->apWiData[0]!=0 );
61875 pInfo = walCkptInfo(pWal);
61876 if( !useWal && pInfo->nBackfill==pWal->hdr.mxFrame
61877 #ifdef SQLITE_ENABLE_SNAPSHOT
61878 && (pWal->pSnapshot==0 || pWal->hdr.mxFrame==0)
61879 #endif
61880 ){
61881 /* The WAL has been completely backfilled (or it is empty).
@@ -62038,11 +62039,11 @@
62038 void *pBuf2 = sqlite3_malloc(szPage);
62039 if( pBuf1==0 || pBuf2==0 ){
62040 rc = SQLITE_NOMEM;
62041 }else{
62042 u32 i = pInfo->nBackfillAttempted;
62043 for(i=pInfo->nBackfillAttempted; i>pInfo->nBackfill; i--){
62044 WalHashLoc sLoc; /* Hash table location */
62045 u32 pgno; /* Page number in db file */
62046 i64 iDbOff; /* Offset of db file entry */
62047 i64 iWalOff; /* Offset of wal file entry */
62048
@@ -103075,10 +103076,17 @@
103075 }
103076 setDoNotMergeFlagOnCopy(v);
103077 sqlite3VdbeResolveLabel(v, endCoalesce);
103078 break;
103079 }
 
 
 
 
 
 
 
103080
103081 default: {
103082 /* The UNLIKELY() function is a no-op. The result is the value
103083 ** of the first argument.
103084 */
@@ -118477,11 +118485,11 @@
118477 FUNCTION(round, 2, 0, 0, roundFunc ),
118478 #endif
118479 FUNCTION(upper, 1, 0, 0, upperFunc ),
118480 FUNCTION(lower, 1, 0, 0, lowerFunc ),
118481 FUNCTION(hex, 1, 0, 0, hexFunc ),
118482 INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, SQLITE_FUNC_COALESCE),
118483 VFUNCTION(random, 0, 0, 0, randomFunc ),
118484 VFUNCTION(randomblob, 1, 0, 0, randomBlob ),
118485 FUNCTION(nullif, 2, 0, 1, nullifFunc ),
118486 DFUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
118487 DFUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
@@ -118517,11 +118525,12 @@
118517 #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
118518 FUNCTION(unknown, -1, 0, 0, unknownFunc ),
118519 #endif
118520 FUNCTION(coalesce, 1, 0, 0, 0 ),
118521 FUNCTION(coalesce, 0, 0, 0, 0 ),
118522 INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, SQLITE_FUNC_COALESCE),
 
118523 };
118524 #ifndef SQLITE_OMIT_ALTERTABLE
118525 sqlite3AlterFunctions();
118526 #endif
118527 sqlite3WindowFunctions();
@@ -151130,17 +151139,23 @@
151130 ){
151131 if( pAppend ){
151132 int i;
151133 int nInit = pList ? pList->nExpr : 0;
151134 for(i=0; i<pAppend->nExpr; i++){
151135 int iDummy;
151136 Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
151137 assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
151138 if( bIntToNull && pDup && sqlite3ExprIsInteger(pDup, &iDummy) ){
151139 pDup->op = TK_NULL;
151140 pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
151141 pDup->u.zToken = 0;
 
 
 
 
 
 
 
151142 }
151143 pList = sqlite3ExprListAppend(pParse, pList, pDup);
151144 if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
151145 }
151146 }
@@ -224664,11 +224679,11 @@
224664 int nArg, /* Number of args */
224665 sqlite3_value **apUnused /* Function arguments */
224666 ){
224667 assert( nArg==0 );
224668 UNUSED_PARAM2(nArg, apUnused);
224669 sqlite3_result_text(pCtx, "fts5: 2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff", -1, SQLITE_TRANSIENT);
224670 }
224671
224672 /*
224673 ** Return true if zName is the extension on one of the shadow tables used
224674 ** by this module.
@@ -229447,12 +229462,12 @@
229447 }
229448 #endif /* SQLITE_CORE */
229449 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
229450
229451 /************** End of stmt.c ************************************************/
229452 #if __LINE__!=229452
229453 #undef SQLITE_SOURCE_ID
229454 #define SQLITE_SOURCE_ID "2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f96alt2"
229455 #endif
229456 /* Return the source-id for this library */
229457 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
229458 /************************** End of sqlite3.c ******************************/
229459
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1162,11 +1162,11 @@
1162 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
1163 ** [sqlite_version()] and [sqlite_source_id()].
1164 */
1165 #define SQLITE_VERSION "3.32.0"
1166 #define SQLITE_VERSION_NUMBER 3032000
1167 #define SQLITE_SOURCE_ID "2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a"
1168
1169 /*
1170 ** CAPI3REF: Run-Time Library Version Numbers
1171 ** KEYWORDS: sqlite3_version sqlite3_sourceid
1172 **
@@ -17119,11 +17119,11 @@
17119 #define SQLITE_FUNC_EPHEM 0x0010 /* Ephemeral. Delete with VDBE */
17120 #define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/
17121 #define SQLITE_FUNC_LENGTH 0x0040 /* Built-in length() function */
17122 #define SQLITE_FUNC_TYPEOF 0x0080 /* Built-in typeof() function */
17123 #define SQLITE_FUNC_COUNT 0x0100 /* Built-in count(*) aggregate */
17124 /* 0x0200 -- available for reuse */
17125 #define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */
17126 #define SQLITE_FUNC_CONSTANT 0x0800 /* Constant inputs give a constant output */
17127 #define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
17128 #define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
17129 ** single query - might change over time */
@@ -17140,10 +17140,11 @@
17140 #define INLINEFUNC_coalesce 0
17141 #define INLINEFUNC_implies_nonnull_row 1
17142 #define INLINEFUNC_expr_implies_expr 2
17143 #define INLINEFUNC_expr_compare 3
17144 #define INLINEFUNC_affinity 4
17145 #define INLINEFUNC_iif 5
17146 #define INLINEFUNC_unlikely 99 /* Default case */
17147
17148 /*
17149 ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
17150 ** used to create the initializers for the FuncDef structures.
@@ -61074,11 +61075,11 @@
61075 pWal->nCkpt++;
61076 pWal->hdr.mxFrame = 0;
61077 sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
61078 memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
61079 walIndexWriteHdr(pWal);
61080 AtomicStore(&pInfo->nBackfill, 0);
61081 pInfo->nBackfillAttempted = 0;
61082 pInfo->aReadMark[1] = 0;
61083 for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
61084 assert( pInfo->aReadMark[0]==0 );
61085 }
@@ -61248,11 +61249,11 @@
61249 if( rc==SQLITE_OK ){
61250 rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));
61251 }
61252 }
61253 if( rc==SQLITE_OK ){
61254 AtomicStore(&pInfo->nBackfill, mxSafeFrame);
61255 }
61256 }
61257
61258 /* Release the reader lock held while backfilling */
61259 walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
@@ -61871,11 +61872,11 @@
61872 }
61873
61874 assert( pWal->nWiData>0 );
61875 assert( pWal->apWiData[0]!=0 );
61876 pInfo = walCkptInfo(pWal);
61877 if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame
61878 #ifdef SQLITE_ENABLE_SNAPSHOT
61879 && (pWal->pSnapshot==0 || pWal->hdr.mxFrame==0)
61880 #endif
61881 ){
61882 /* The WAL has been completely backfilled (or it is empty).
@@ -62038,11 +62039,11 @@
62039 void *pBuf2 = sqlite3_malloc(szPage);
62040 if( pBuf1==0 || pBuf2==0 ){
62041 rc = SQLITE_NOMEM;
62042 }else{
62043 u32 i = pInfo->nBackfillAttempted;
62044 for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){
62045 WalHashLoc sLoc; /* Hash table location */
62046 u32 pgno; /* Page number in db file */
62047 i64 iDbOff; /* Offset of db file entry */
62048 i64 iWalOff; /* Offset of wal file entry */
62049
@@ -103075,10 +103076,17 @@
103076 }
103077 setDoNotMergeFlagOnCopy(v);
103078 sqlite3VdbeResolveLabel(v, endCoalesce);
103079 break;
103080 }
103081 case INLINEFUNC_iif: {
103082 Expr caseExpr;
103083 memset(&caseExpr, 0, sizeof(caseExpr));
103084 caseExpr.op = TK_CASE;
103085 caseExpr.x.pList = pFarg;
103086 return sqlite3ExprCodeTarget(pParse, &caseExpr, target);
103087 }
103088
103089 default: {
103090 /* The UNLIKELY() function is a no-op. The result is the value
103091 ** of the first argument.
103092 */
@@ -118477,11 +118485,11 @@
118485 FUNCTION(round, 2, 0, 0, roundFunc ),
118486 #endif
118487 FUNCTION(upper, 1, 0, 0, upperFunc ),
118488 FUNCTION(lower, 1, 0, 0, lowerFunc ),
118489 FUNCTION(hex, 1, 0, 0, hexFunc ),
118490 INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, 0 ),
118491 VFUNCTION(random, 0, 0, 0, randomFunc ),
118492 VFUNCTION(randomblob, 1, 0, 0, randomBlob ),
118493 FUNCTION(nullif, 2, 0, 1, nullifFunc ),
118494 DFUNCTION(sqlite_version, 0, 0, 0, versionFunc ),
118495 DFUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ),
@@ -118517,11 +118525,12 @@
118525 #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
118526 FUNCTION(unknown, -1, 0, 0, unknownFunc ),
118527 #endif
118528 FUNCTION(coalesce, 1, 0, 0, 0 ),
118529 FUNCTION(coalesce, 0, 0, 0, 0 ),
118530 INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, 0 ),
118531 INLINE_FUNC(iif, 3, INLINEFUNC_iif, 0 ),
118532 };
118533 #ifndef SQLITE_OMIT_ALTERTABLE
118534 sqlite3AlterFunctions();
118535 #endif
118536 sqlite3WindowFunctions();
@@ -151130,17 +151139,23 @@
151139 ){
151140 if( pAppend ){
151141 int i;
151142 int nInit = pList ? pList->nExpr : 0;
151143 for(i=0; i<pAppend->nExpr; i++){
 
151144 Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
151145 assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
151146 if( bIntToNull && pDup ){
151147 int iDummy;
151148 Expr *pSub;
151149 for(pSub=pDup; ExprHasProperty(pSub, EP_Skip); pSub=pSub->pLeft){
151150 assert( pSub );
151151 }
151152 if( sqlite3ExprIsInteger(pSub, &iDummy) ){
151153 pSub->op = TK_NULL;
151154 pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
151155 pSub->u.zToken = 0;
151156 }
151157 }
151158 pList = sqlite3ExprListAppend(pParse, pList, pDup);
151159 if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
151160 }
151161 }
@@ -224664,11 +224679,11 @@
224679 int nArg, /* Number of args */
224680 sqlite3_value **apUnused /* Function arguments */
224681 ){
224682 assert( nArg==0 );
224683 UNUSED_PARAM2(nArg, apUnused);
224684 sqlite3_result_text(pCtx, "fts5: 2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a", -1, SQLITE_TRANSIENT);
224685 }
224686
224687 /*
224688 ** Return true if zName is the extension on one of the shadow tables used
224689 ** by this module.
@@ -229447,12 +229462,12 @@
229462 }
229463 #endif /* SQLITE_CORE */
229464 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
229465
229466 /************** End of stmt.c ************************************************/
229467 #if __LINE__!=229467
229468 #undef SQLITE_SOURCE_ID
229469 #define SQLITE_SOURCE_ID "2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88alt2"
229470 #endif
229471 /* Return the source-id for this library */
229472 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
229473 /************************** End of sqlite3.c ******************************/
229474
+1 -1
--- 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.32.0"
127127
#define SQLITE_VERSION_NUMBER 3032000
128
-#define SQLITE_SOURCE_ID "2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff"
128
+#define SQLITE_SOURCE_ID "2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a"
129129
130130
/*
131131
** CAPI3REF: Run-Time Library Version Numbers
132132
** KEYWORDS: sqlite3_version sqlite3_sourceid
133133
**
134134
--- 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.32.0"
127 #define SQLITE_VERSION_NUMBER 3032000
128 #define SQLITE_SOURCE_ID "2020-05-08 19:02:21 3a16c0ce4d8851f79f670d94786032c8007619154ece44647dc9cc5b1f9654ff"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134
--- 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.32.0"
127 #define SQLITE_VERSION_NUMBER 3032000
128 #define SQLITE_SOURCE_ID "2020-05-13 18:03:34 fce173cd211b15867369b6a54fad48168352fc83981a722ce98e57299b88608a"
129
130 /*
131 ** CAPI3REF: Run-Time Library Version Numbers
132 ** KEYWORDS: sqlite3_version sqlite3_sourceid
133 **
134

Keyboard Shortcuts

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