Fossil SCM
Update the built-in SQLite to the 3.39.0 release.
Commit
720f0956e0767f342382c4b9a3f107ed2ac5bcd52ac8eb9e557a7249d96f4d5e
Parent
8903d1ebe079f09…
2 files changed
+8
-7
+1
-1
+8
-7
| --- extsrc/sqlite3.c | ||
| +++ extsrc/sqlite3.c | ||
| @@ -452,11 +452,11 @@ | ||
| 452 | 452 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 453 | 453 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 454 | 454 | */ |
| 455 | 455 | #define SQLITE_VERSION "3.39.0" |
| 456 | 456 | #define SQLITE_VERSION_NUMBER 3039000 |
| 457 | -#define SQLITE_SOURCE_ID "2022-06-22 18:51:47 83ff1a28e3e7a99fa90d5079897d76529c4256eed859bf7cb98b860fbedfalt1" | |
| 457 | +#define SQLITE_SOURCE_ID "2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918" | |
| 458 | 458 | |
| 459 | 459 | /* |
| 460 | 460 | ** CAPI3REF: Run-Time Library Version Numbers |
| 461 | 461 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 462 | 462 | ** |
| @@ -80163,11 +80163,12 @@ | ||
| 80163 | 80163 | if( pVal==0 ){ |
| 80164 | 80164 | rc = SQLITE_NOMEM_BKPT; |
| 80165 | 80165 | goto value_from_function_out; |
| 80166 | 80166 | } |
| 80167 | 80167 | |
| 80168 | - assert( pCtx->pParse->rc==SQLITE_OK ); | |
| 80168 | + testcase( pCtx->pParse->rc==SQLITE_ERROR ); | |
| 80169 | + testcase( pCtx->pParse->rc==SQLITE_OK ); | |
| 80169 | 80170 | memset(&ctx, 0, sizeof(ctx)); |
| 80170 | 80171 | ctx.pOut = pVal; |
| 80171 | 80172 | ctx.pFunc = pFunc; |
| 80172 | 80173 | ctx.enc = ENC(db); |
| 80173 | 80174 | pFunc->xSFunc(&ctx, nVal, apVal); |
| @@ -92252,11 +92253,11 @@ | ||
| 92252 | 92253 | assert( sqlite3SchemaMutexHeld(db, pOp->p1, 0) ); |
| 92253 | 92254 | /* See note about index shifting on OP_ReadCookie */ |
| 92254 | 92255 | rc = sqlite3BtreeUpdateMeta(pDb->pBt, pOp->p2, pOp->p3); |
| 92255 | 92256 | if( pOp->p2==BTREE_SCHEMA_VERSION ){ |
| 92256 | 92257 | /* When the schema cookie changes, record the new cookie internally */ |
| 92257 | - pDb->pSchema->schema_cookie = pOp->p3 - pOp->p5; | |
| 92258 | + *(u32*)&pDb->pSchema->schema_cookie = *(u32*)&pOp->p3 - pOp->p5; | |
| 92258 | 92259 | db->mDbFlags |= DBFLAG_SchemaChange; |
| 92259 | 92260 | sqlite3FkClearTriggerCache(db, pOp->p1); |
| 92260 | 92261 | }else if( pOp->p2==BTREE_FILE_FORMAT ){ |
| 92261 | 92262 | /* Record changes in the file format */ |
| 92262 | 92263 | pDb->pSchema->file_format = pOp->p3; |
| @@ -139808,12 +139809,12 @@ | ||
| 139808 | 139809 | ** |
| 139809 | 139810 | ** See also tickets #306, #350, and #3300. |
| 139810 | 139811 | */ |
| 139811 | 139812 | if( (pSubitem->fg.jointype & (JT_OUTER|JT_LTORJ))!=0 ){ |
| 139812 | 139813 | if( pSubSrc->nSrc>1 /* (3a) */ |
| 139813 | - || isAgg /* (3b) */ | |
| 139814 | - || IsVirtual(pSubSrc->a[0].pTab) /* (3c) */ | |
| 139814 | + || isAgg /* (3c) */ | |
| 139815 | + || IsVirtual(pSubSrc->a[0].pTab) /* (3b) */ | |
| 139815 | 139816 | || (p->selFlags & SF_Distinct)!=0 /* (3d) */ |
| 139816 | 139817 | || (pSubitem->fg.jointype & JT_RIGHT)!=0 /* (26) */ |
| 139817 | 139818 | ){ |
| 139818 | 139819 | return 0; |
| 139819 | 139820 | } |
| @@ -159512,11 +159513,11 @@ | ||
| 159512 | 159513 | } |
| 159513 | 159514 | |
| 159514 | 159515 | /* Analyze all of the subexpressions. */ |
| 159515 | 159516 | sqlite3WhereExprAnalyze(pTabList, &pWInfo->sWC); |
| 159516 | 159517 | sqlite3WhereAddLimit(&pWInfo->sWC, pLimit); |
| 159517 | - if( db->mallocFailed ) goto whereBeginError; | |
| 159518 | + if( pParse->nErr ) goto whereBeginError; | |
| 159518 | 159519 | |
| 159519 | 159520 | /* Special case: WHERE terms that do not refer to any tables in the join |
| 159520 | 159521 | ** (constant expressions). Evaluate each such term, and jump over all the |
| 159521 | 159522 | ** generated code if the result is not true. |
| 159522 | 159523 | ** |
| @@ -236614,11 +236615,11 @@ | ||
| 236614 | 236615 | int nArg, /* Number of args */ |
| 236615 | 236616 | sqlite3_value **apUnused /* Function arguments */ |
| 236616 | 236617 | ){ |
| 236617 | 236618 | assert( nArg==0 ); |
| 236618 | 236619 | UNUSED_PARAM2(nArg, apUnused); |
| 236619 | - sqlite3_result_text(pCtx, "fts5: 2022-06-22 18:51:47 83ff1a28e3e7a99fa90d5079897d76529c4256eed859bf7cb98b860fbedfdc5b", -1, SQLITE_TRANSIENT); | |
| 236620 | + sqlite3_result_text(pCtx, "fts5: 2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918", -1, SQLITE_TRANSIENT); | |
| 236620 | 236621 | } |
| 236621 | 236622 | |
| 236622 | 236623 | /* |
| 236623 | 236624 | ** Return true if zName is the extension on one of the shadow tables used |
| 236624 | 236625 | ** by this module. |
| 236625 | 236626 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -452,11 +452,11 @@ | |
| 452 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 453 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 454 | */ |
| 455 | #define SQLITE_VERSION "3.39.0" |
| 456 | #define SQLITE_VERSION_NUMBER 3039000 |
| 457 | #define SQLITE_SOURCE_ID "2022-06-22 18:51:47 83ff1a28e3e7a99fa90d5079897d76529c4256eed859bf7cb98b860fbedfalt1" |
| 458 | |
| 459 | /* |
| 460 | ** CAPI3REF: Run-Time Library Version Numbers |
| 461 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 462 | ** |
| @@ -80163,11 +80163,12 @@ | |
| 80163 | if( pVal==0 ){ |
| 80164 | rc = SQLITE_NOMEM_BKPT; |
| 80165 | goto value_from_function_out; |
| 80166 | } |
| 80167 | |
| 80168 | assert( pCtx->pParse->rc==SQLITE_OK ); |
| 80169 | memset(&ctx, 0, sizeof(ctx)); |
| 80170 | ctx.pOut = pVal; |
| 80171 | ctx.pFunc = pFunc; |
| 80172 | ctx.enc = ENC(db); |
| 80173 | pFunc->xSFunc(&ctx, nVal, apVal); |
| @@ -92252,11 +92253,11 @@ | |
| 92252 | assert( sqlite3SchemaMutexHeld(db, pOp->p1, 0) ); |
| 92253 | /* See note about index shifting on OP_ReadCookie */ |
| 92254 | rc = sqlite3BtreeUpdateMeta(pDb->pBt, pOp->p2, pOp->p3); |
| 92255 | if( pOp->p2==BTREE_SCHEMA_VERSION ){ |
| 92256 | /* When the schema cookie changes, record the new cookie internally */ |
| 92257 | pDb->pSchema->schema_cookie = pOp->p3 - pOp->p5; |
| 92258 | db->mDbFlags |= DBFLAG_SchemaChange; |
| 92259 | sqlite3FkClearTriggerCache(db, pOp->p1); |
| 92260 | }else if( pOp->p2==BTREE_FILE_FORMAT ){ |
| 92261 | /* Record changes in the file format */ |
| 92262 | pDb->pSchema->file_format = pOp->p3; |
| @@ -139808,12 +139809,12 @@ | |
| 139808 | ** |
| 139809 | ** See also tickets #306, #350, and #3300. |
| 139810 | */ |
| 139811 | if( (pSubitem->fg.jointype & (JT_OUTER|JT_LTORJ))!=0 ){ |
| 139812 | if( pSubSrc->nSrc>1 /* (3a) */ |
| 139813 | || isAgg /* (3b) */ |
| 139814 | || IsVirtual(pSubSrc->a[0].pTab) /* (3c) */ |
| 139815 | || (p->selFlags & SF_Distinct)!=0 /* (3d) */ |
| 139816 | || (pSubitem->fg.jointype & JT_RIGHT)!=0 /* (26) */ |
| 139817 | ){ |
| 139818 | return 0; |
| 139819 | } |
| @@ -159512,11 +159513,11 @@ | |
| 159512 | } |
| 159513 | |
| 159514 | /* Analyze all of the subexpressions. */ |
| 159515 | sqlite3WhereExprAnalyze(pTabList, &pWInfo->sWC); |
| 159516 | sqlite3WhereAddLimit(&pWInfo->sWC, pLimit); |
| 159517 | if( db->mallocFailed ) goto whereBeginError; |
| 159518 | |
| 159519 | /* Special case: WHERE terms that do not refer to any tables in the join |
| 159520 | ** (constant expressions). Evaluate each such term, and jump over all the |
| 159521 | ** generated code if the result is not true. |
| 159522 | ** |
| @@ -236614,11 +236615,11 @@ | |
| 236614 | int nArg, /* Number of args */ |
| 236615 | sqlite3_value **apUnused /* Function arguments */ |
| 236616 | ){ |
| 236617 | assert( nArg==0 ); |
| 236618 | UNUSED_PARAM2(nArg, apUnused); |
| 236619 | sqlite3_result_text(pCtx, "fts5: 2022-06-22 18:51:47 83ff1a28e3e7a99fa90d5079897d76529c4256eed859bf7cb98b860fbedfdc5b", -1, SQLITE_TRANSIENT); |
| 236620 | } |
| 236621 | |
| 236622 | /* |
| 236623 | ** Return true if zName is the extension on one of the shadow tables used |
| 236624 | ** by this module. |
| 236625 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -452,11 +452,11 @@ | |
| 452 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 453 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 454 | */ |
| 455 | #define SQLITE_VERSION "3.39.0" |
| 456 | #define SQLITE_VERSION_NUMBER 3039000 |
| 457 | #define SQLITE_SOURCE_ID "2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918" |
| 458 | |
| 459 | /* |
| 460 | ** CAPI3REF: Run-Time Library Version Numbers |
| 461 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 462 | ** |
| @@ -80163,11 +80163,12 @@ | |
| 80163 | if( pVal==0 ){ |
| 80164 | rc = SQLITE_NOMEM_BKPT; |
| 80165 | goto value_from_function_out; |
| 80166 | } |
| 80167 | |
| 80168 | testcase( pCtx->pParse->rc==SQLITE_ERROR ); |
| 80169 | testcase( pCtx->pParse->rc==SQLITE_OK ); |
| 80170 | memset(&ctx, 0, sizeof(ctx)); |
| 80171 | ctx.pOut = pVal; |
| 80172 | ctx.pFunc = pFunc; |
| 80173 | ctx.enc = ENC(db); |
| 80174 | pFunc->xSFunc(&ctx, nVal, apVal); |
| @@ -92252,11 +92253,11 @@ | |
| 92253 | assert( sqlite3SchemaMutexHeld(db, pOp->p1, 0) ); |
| 92254 | /* See note about index shifting on OP_ReadCookie */ |
| 92255 | rc = sqlite3BtreeUpdateMeta(pDb->pBt, pOp->p2, pOp->p3); |
| 92256 | if( pOp->p2==BTREE_SCHEMA_VERSION ){ |
| 92257 | /* When the schema cookie changes, record the new cookie internally */ |
| 92258 | *(u32*)&pDb->pSchema->schema_cookie = *(u32*)&pOp->p3 - pOp->p5; |
| 92259 | db->mDbFlags |= DBFLAG_SchemaChange; |
| 92260 | sqlite3FkClearTriggerCache(db, pOp->p1); |
| 92261 | }else if( pOp->p2==BTREE_FILE_FORMAT ){ |
| 92262 | /* Record changes in the file format */ |
| 92263 | pDb->pSchema->file_format = pOp->p3; |
| @@ -139808,12 +139809,12 @@ | |
| 139809 | ** |
| 139810 | ** See also tickets #306, #350, and #3300. |
| 139811 | */ |
| 139812 | if( (pSubitem->fg.jointype & (JT_OUTER|JT_LTORJ))!=0 ){ |
| 139813 | if( pSubSrc->nSrc>1 /* (3a) */ |
| 139814 | || isAgg /* (3c) */ |
| 139815 | || IsVirtual(pSubSrc->a[0].pTab) /* (3b) */ |
| 139816 | || (p->selFlags & SF_Distinct)!=0 /* (3d) */ |
| 139817 | || (pSubitem->fg.jointype & JT_RIGHT)!=0 /* (26) */ |
| 139818 | ){ |
| 139819 | return 0; |
| 139820 | } |
| @@ -159512,11 +159513,11 @@ | |
| 159513 | } |
| 159514 | |
| 159515 | /* Analyze all of the subexpressions. */ |
| 159516 | sqlite3WhereExprAnalyze(pTabList, &pWInfo->sWC); |
| 159517 | sqlite3WhereAddLimit(&pWInfo->sWC, pLimit); |
| 159518 | if( pParse->nErr ) goto whereBeginError; |
| 159519 | |
| 159520 | /* Special case: WHERE terms that do not refer to any tables in the join |
| 159521 | ** (constant expressions). Evaluate each such term, and jump over all the |
| 159522 | ** generated code if the result is not true. |
| 159523 | ** |
| @@ -236614,11 +236615,11 @@ | |
| 236615 | int nArg, /* Number of args */ |
| 236616 | sqlite3_value **apUnused /* Function arguments */ |
| 236617 | ){ |
| 236618 | assert( nArg==0 ); |
| 236619 | UNUSED_PARAM2(nArg, apUnused); |
| 236620 | sqlite3_result_text(pCtx, "fts5: 2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918", -1, SQLITE_TRANSIENT); |
| 236621 | } |
| 236622 | |
| 236623 | /* |
| 236624 | ** Return true if zName is the extension on one of the shadow tables used |
| 236625 | ** by this module. |
| 236626 |
+1
-1
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | 149 | #define SQLITE_VERSION "3.39.0" |
| 150 | 150 | #define SQLITE_VERSION_NUMBER 3039000 |
| 151 | -#define SQLITE_SOURCE_ID "2022-06-22 18:51:47 83ff1a28e3e7a99fa90d5079897d76529c4256eed859bf7cb98b860fbedfalt1" | |
| 151 | +#define SQLITE_SOURCE_ID "2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918" | |
| 152 | 152 | |
| 153 | 153 | /* |
| 154 | 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | 156 | ** |
| 157 | 157 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.39.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3039000 |
| 151 | #define SQLITE_SOURCE_ID "2022-06-22 18:51:47 83ff1a28e3e7a99fa90d5079897d76529c4256eed859bf7cb98b860fbedfalt1" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| 157 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.39.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3039000 |
| 151 | #define SQLITE_SOURCE_ID "2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| 157 |