Fossil SCM
Update the built-in SQLite with the patch to support the IIF() function.
Commit
6fa4d92e6a51b7291b866750d5c30be811f07fccbde44d9ae592dd4ad55c9679
Parent
6711b2225115c8a…
2 files changed
+31
-16
+1
-1
+31
-16
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1162,11 +1162,11 @@ | ||
| 1162 | 1162 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 1163 | 1163 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 1164 | 1164 | */ |
| 1165 | 1165 | #define SQLITE_VERSION "3.32.0" |
| 1166 | 1166 | #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" | |
| 1168 | 1168 | |
| 1169 | 1169 | /* |
| 1170 | 1170 | ** CAPI3REF: Run-Time Library Version Numbers |
| 1171 | 1171 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 1172 | 1172 | ** |
| @@ -17119,11 +17119,11 @@ | ||
| 17119 | 17119 | #define SQLITE_FUNC_EPHEM 0x0010 /* Ephemeral. Delete with VDBE */ |
| 17120 | 17120 | #define SQLITE_FUNC_NEEDCOLL 0x0020 /* sqlite3GetFuncCollSeq() might be called*/ |
| 17121 | 17121 | #define SQLITE_FUNC_LENGTH 0x0040 /* Built-in length() function */ |
| 17122 | 17122 | #define SQLITE_FUNC_TYPEOF 0x0080 /* Built-in typeof() function */ |
| 17123 | 17123 | #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 */ | |
| 17125 | 17125 | #define SQLITE_FUNC_UNLIKELY 0x0400 /* Built-in unlikely() function */ |
| 17126 | 17126 | #define SQLITE_FUNC_CONSTANT 0x0800 /* Constant inputs give a constant output */ |
| 17127 | 17127 | #define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */ |
| 17128 | 17128 | #define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a |
| 17129 | 17129 | ** single query - might change over time */ |
| @@ -17140,10 +17140,11 @@ | ||
| 17140 | 17140 | #define INLINEFUNC_coalesce 0 |
| 17141 | 17141 | #define INLINEFUNC_implies_nonnull_row 1 |
| 17142 | 17142 | #define INLINEFUNC_expr_implies_expr 2 |
| 17143 | 17143 | #define INLINEFUNC_expr_compare 3 |
| 17144 | 17144 | #define INLINEFUNC_affinity 4 |
| 17145 | +#define INLINEFUNC_iif 5 | |
| 17145 | 17146 | #define INLINEFUNC_unlikely 99 /* Default case */ |
| 17146 | 17147 | |
| 17147 | 17148 | /* |
| 17148 | 17149 | ** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are |
| 17149 | 17150 | ** used to create the initializers for the FuncDef structures. |
| @@ -61074,11 +61075,11 @@ | ||
| 61074 | 61075 | pWal->nCkpt++; |
| 61075 | 61076 | pWal->hdr.mxFrame = 0; |
| 61076 | 61077 | sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0])); |
| 61077 | 61078 | memcpy(&pWal->hdr.aSalt[1], &salt1, 4); |
| 61078 | 61079 | walIndexWriteHdr(pWal); |
| 61079 | - pInfo->nBackfill = 0; | |
| 61080 | + AtomicStore(&pInfo->nBackfill, 0); | |
| 61080 | 61081 | pInfo->nBackfillAttempted = 0; |
| 61081 | 61082 | pInfo->aReadMark[1] = 0; |
| 61082 | 61083 | for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED; |
| 61083 | 61084 | assert( pInfo->aReadMark[0]==0 ); |
| 61084 | 61085 | } |
| @@ -61248,11 +61249,11 @@ | ||
| 61248 | 61249 | if( rc==SQLITE_OK ){ |
| 61249 | 61250 | rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags)); |
| 61250 | 61251 | } |
| 61251 | 61252 | } |
| 61252 | 61253 | if( rc==SQLITE_OK ){ |
| 61253 | - pInfo->nBackfill = mxSafeFrame; | |
| 61254 | + AtomicStore(&pInfo->nBackfill, mxSafeFrame); | |
| 61254 | 61255 | } |
| 61255 | 61256 | } |
| 61256 | 61257 | |
| 61257 | 61258 | /* Release the reader lock held while backfilling */ |
| 61258 | 61259 | walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1); |
| @@ -61871,11 +61872,11 @@ | ||
| 61871 | 61872 | } |
| 61872 | 61873 | |
| 61873 | 61874 | assert( pWal->nWiData>0 ); |
| 61874 | 61875 | assert( pWal->apWiData[0]!=0 ); |
| 61875 | 61876 | pInfo = walCkptInfo(pWal); |
| 61876 | - if( !useWal && pInfo->nBackfill==pWal->hdr.mxFrame | |
| 61877 | + if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame | |
| 61877 | 61878 | #ifdef SQLITE_ENABLE_SNAPSHOT |
| 61878 | 61879 | && (pWal->pSnapshot==0 || pWal->hdr.mxFrame==0) |
| 61879 | 61880 | #endif |
| 61880 | 61881 | ){ |
| 61881 | 61882 | /* The WAL has been completely backfilled (or it is empty). |
| @@ -62038,11 +62039,11 @@ | ||
| 62038 | 62039 | void *pBuf2 = sqlite3_malloc(szPage); |
| 62039 | 62040 | if( pBuf1==0 || pBuf2==0 ){ |
| 62040 | 62041 | rc = SQLITE_NOMEM; |
| 62041 | 62042 | }else{ |
| 62042 | 62043 | u32 i = pInfo->nBackfillAttempted; |
| 62043 | - for(i=pInfo->nBackfillAttempted; i>pInfo->nBackfill; i--){ | |
| 62044 | + for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){ | |
| 62044 | 62045 | WalHashLoc sLoc; /* Hash table location */ |
| 62045 | 62046 | u32 pgno; /* Page number in db file */ |
| 62046 | 62047 | i64 iDbOff; /* Offset of db file entry */ |
| 62047 | 62048 | i64 iWalOff; /* Offset of wal file entry */ |
| 62048 | 62049 | |
| @@ -103075,10 +103076,17 @@ | ||
| 103075 | 103076 | } |
| 103076 | 103077 | setDoNotMergeFlagOnCopy(v); |
| 103077 | 103078 | sqlite3VdbeResolveLabel(v, endCoalesce); |
| 103078 | 103079 | break; |
| 103079 | 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 | + } | |
| 103080 | 103088 | |
| 103081 | 103089 | default: { |
| 103082 | 103090 | /* The UNLIKELY() function is a no-op. The result is the value |
| 103083 | 103091 | ** of the first argument. |
| 103084 | 103092 | */ |
| @@ -118477,11 +118485,11 @@ | ||
| 118477 | 118485 | FUNCTION(round, 2, 0, 0, roundFunc ), |
| 118478 | 118486 | #endif |
| 118479 | 118487 | FUNCTION(upper, 1, 0, 0, upperFunc ), |
| 118480 | 118488 | FUNCTION(lower, 1, 0, 0, lowerFunc ), |
| 118481 | 118489 | FUNCTION(hex, 1, 0, 0, hexFunc ), |
| 118482 | - INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, SQLITE_FUNC_COALESCE), | |
| 118490 | + INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, 0 ), | |
| 118483 | 118491 | VFUNCTION(random, 0, 0, 0, randomFunc ), |
| 118484 | 118492 | VFUNCTION(randomblob, 1, 0, 0, randomBlob ), |
| 118485 | 118493 | FUNCTION(nullif, 2, 0, 1, nullifFunc ), |
| 118486 | 118494 | DFUNCTION(sqlite_version, 0, 0, 0, versionFunc ), |
| 118487 | 118495 | DFUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ), |
| @@ -118517,11 +118525,12 @@ | ||
| 118517 | 118525 | #ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
| 118518 | 118526 | FUNCTION(unknown, -1, 0, 0, unknownFunc ), |
| 118519 | 118527 | #endif |
| 118520 | 118528 | FUNCTION(coalesce, 1, 0, 0, 0 ), |
| 118521 | 118529 | 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 ), | |
| 118523 | 118532 | }; |
| 118524 | 118533 | #ifndef SQLITE_OMIT_ALTERTABLE |
| 118525 | 118534 | sqlite3AlterFunctions(); |
| 118526 | 118535 | #endif |
| 118527 | 118536 | sqlite3WindowFunctions(); |
| @@ -151130,17 +151139,23 @@ | ||
| 151130 | 151139 | ){ |
| 151131 | 151140 | if( pAppend ){ |
| 151132 | 151141 | int i; |
| 151133 | 151142 | int nInit = pList ? pList->nExpr : 0; |
| 151134 | 151143 | for(i=0; i<pAppend->nExpr; i++){ |
| 151135 | - int iDummy; | |
| 151136 | 151144 | Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0); |
| 151137 | 151145 | 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 | + } | |
| 151142 | 151157 | } |
| 151143 | 151158 | pList = sqlite3ExprListAppend(pParse, pList, pDup); |
| 151144 | 151159 | if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags; |
| 151145 | 151160 | } |
| 151146 | 151161 | } |
| @@ -224664,11 +224679,11 @@ | ||
| 224664 | 224679 | int nArg, /* Number of args */ |
| 224665 | 224680 | sqlite3_value **apUnused /* Function arguments */ |
| 224666 | 224681 | ){ |
| 224667 | 224682 | assert( nArg==0 ); |
| 224668 | 224683 | 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); | |
| 224670 | 224685 | } |
| 224671 | 224686 | |
| 224672 | 224687 | /* |
| 224673 | 224688 | ** Return true if zName is the extension on one of the shadow tables used |
| 224674 | 224689 | ** by this module. |
| @@ -229447,12 +229462,12 @@ | ||
| 229447 | 229462 | } |
| 229448 | 229463 | #endif /* SQLITE_CORE */ |
| 229449 | 229464 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ |
| 229450 | 229465 | |
| 229451 | 229466 | /************** End of stmt.c ************************************************/ |
| 229452 | -#if __LINE__!=229452 | |
| 229467 | +#if __LINE__!=229467 | |
| 229453 | 229468 | #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" | |
| 229455 | 229470 | #endif |
| 229456 | 229471 | /* Return the source-id for this library */ |
| 229457 | 229472 | SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; } |
| 229458 | 229473 | /************************** End of sqlite3.c ******************************/ |
| 229459 | 229474 |
| --- 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 @@ | ||
| 123 | 123 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 124 | 124 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 125 | 125 | */ |
| 126 | 126 | #define SQLITE_VERSION "3.32.0" |
| 127 | 127 | #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" | |
| 129 | 129 | |
| 130 | 130 | /* |
| 131 | 131 | ** CAPI3REF: Run-Time Library Version Numbers |
| 132 | 132 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 133 | 133 | ** |
| 134 | 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-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 |