Fossil SCM
Update the built-in SQLite to version 3.19.2.
Commit
418ac81caed19c1725a860efd301919720c42971a2a09b4acf6e80cb4082504d
Parent
277274c0c7eabdf…
2 files changed
+22
-12
+3
-3
+22
-12
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | -** version 3.19.1. By combining all the individual C code files into this | |
| 3 | +** version 3.19.2. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| @@ -396,13 +396,13 @@ | ||
| 396 | 396 | ** |
| 397 | 397 | ** See also: [sqlite3_libversion()], |
| 398 | 398 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 399 | 399 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 400 | 400 | */ |
| 401 | -#define SQLITE_VERSION "3.19.1" | |
| 402 | -#define SQLITE_VERSION_NUMBER 3019001 | |
| 403 | -#define SQLITE_SOURCE_ID "2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86" | |
| 401 | +#define SQLITE_VERSION "3.19.2" | |
| 402 | +#define SQLITE_VERSION_NUMBER 3019002 | |
| 403 | +#define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9" | |
| 404 | 404 | |
| 405 | 405 | /* |
| 406 | 406 | ** CAPI3REF: Run-Time Library Version Numbers |
| 407 | 407 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 408 | 408 | ** |
| @@ -92630,14 +92630,16 @@ | ||
| 92630 | 92630 | testcase( pExpr->op==TK_COLUMN ); |
| 92631 | 92631 | testcase( pExpr->op==TK_AGG_FUNCTION ); |
| 92632 | 92632 | testcase( pExpr->op==TK_AGG_COLUMN ); |
| 92633 | 92633 | if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){ |
| 92634 | 92634 | return WRC_Continue; |
| 92635 | - }else{ | |
| 92636 | - pWalker->eCode = 0; | |
| 92637 | - return WRC_Abort; | |
| 92638 | 92635 | } |
| 92636 | + /* Fall through */ | |
| 92637 | + case TK_IF_NULL_ROW: | |
| 92638 | + testcase( pExpr->op==TK_IF_NULL_ROW ); | |
| 92639 | + pWalker->eCode = 0; | |
| 92640 | + return WRC_Abort; | |
| 92639 | 92641 | case TK_VARIABLE: |
| 92640 | 92642 | if( pWalker->eCode==5 ){ |
| 92641 | 92643 | /* Silently convert bound parameters that appear inside of CREATE |
| 92642 | 92644 | ** statements into a NULL when parsing the CREATE statement text out |
| 92643 | 92645 | ** of the sqlite_master table */ |
| @@ -120022,10 +120024,18 @@ | ||
| 120022 | 120024 | isLeftJoin = 1; |
| 120023 | 120025 | if( pSubSrc->nSrc>1 || isAgg ){ |
| 120024 | 120026 | return 0; /* Restriction (3) */ |
| 120025 | 120027 | } |
| 120026 | 120028 | } |
| 120029 | +#ifdef SQLITE_EXTRA_IFNULLROW | |
| 120030 | + else if( iFrom>0 && !isAgg ){ | |
| 120031 | + /* Setting isLeftJoin to -1 causes OP_IfNullRow opcodes to be generated for | |
| 120032 | + ** every reference to any result column from subquery in a join, even though | |
| 120033 | + ** they are not necessary. This will stress-test the OP_IfNullRow opcode. */ | |
| 120034 | + isLeftJoin = -1; | |
| 120035 | + } | |
| 120036 | +#endif | |
| 120027 | 120037 | |
| 120028 | 120038 | /* Restriction 17: If the sub-query is a compound SELECT, then it must |
| 120029 | 120039 | ** use only the UNION ALL operator. And none of the simple select queries |
| 120030 | 120040 | ** that make up the compound SELECT are allowed to be aggregate or distinct |
| 120031 | 120041 | ** queries. |
| @@ -120275,11 +120285,11 @@ | ||
| 120275 | 120285 | assert( pSub->pPrior==0 ); |
| 120276 | 120286 | pParent->pOrderBy = pOrderBy; |
| 120277 | 120287 | pSub->pOrderBy = 0; |
| 120278 | 120288 | } |
| 120279 | 120289 | pWhere = sqlite3ExprDup(db, pSub->pWhere, 0); |
| 120280 | - if( isLeftJoin ){ | |
| 120290 | + if( isLeftJoin>0 ){ | |
| 120281 | 120291 | setJoinExpr(pWhere, iNewParent); |
| 120282 | 120292 | } |
| 120283 | 120293 | if( subqueryIsAgg ){ |
| 120284 | 120294 | assert( pParent->pHaving==0 ); |
| 120285 | 120295 | pParent->pHaving = pParent->pWhere; |
| @@ -130284,15 +130294,15 @@ | ||
| 130284 | 130294 | */ |
| 130285 | 130295 | SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){ |
| 130286 | 130296 | Bitmask mask; |
| 130287 | 130297 | if( p==0 ) return 0; |
| 130288 | 130298 | if( p->op==TK_COLUMN ){ |
| 130289 | - mask = sqlite3WhereGetMask(pMaskSet, p->iTable); | |
| 130290 | - return mask; | |
| 130299 | + return sqlite3WhereGetMask(pMaskSet, p->iTable); | |
| 130291 | 130300 | } |
| 130301 | + mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0; | |
| 130292 | 130302 | assert( !ExprHasProperty(p, EP_TokenOnly) ); |
| 130293 | - mask = p->pRight ? sqlite3WhereExprUsage(pMaskSet, p->pRight) : 0; | |
| 130303 | + if( p->pRight ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pRight); | |
| 130294 | 130304 | if( p->pLeft ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft); |
| 130295 | 130305 | if( ExprHasProperty(p, EP_xIsSelect) ){ |
| 130296 | 130306 | mask |= exprSelectUsage(pMaskSet, p->x.pSelect); |
| 130297 | 130307 | }else if( p->x.pList ){ |
| 130298 | 130308 | mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList); |
| @@ -199044,11 +199054,11 @@ | ||
| 199044 | 199054 | int nArg, /* Number of args */ |
| 199045 | 199055 | sqlite3_value **apUnused /* Function arguments */ |
| 199046 | 199056 | ){ |
| 199047 | 199057 | assert( nArg==0 ); |
| 199048 | 199058 | UNUSED_PARAM2(nArg, apUnused); |
| 199049 | - sqlite3_result_text(pCtx, "fts5: 2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86", -1, SQLITE_TRANSIENT); | |
| 199059 | + sqlite3_result_text(pCtx, "fts5: 2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9", -1, SQLITE_TRANSIENT); | |
| 199050 | 199060 | } |
| 199051 | 199061 | |
| 199052 | 199062 | static int fts5Init(sqlite3 *db){ |
| 199053 | 199063 | static const sqlite3_module fts5Mod = { |
| 199054 | 199064 | /* iVersion */ 2, |
| 199055 | 199065 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.19.1. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -396,13 +396,13 @@ | |
| 396 | ** |
| 397 | ** See also: [sqlite3_libversion()], |
| 398 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 399 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 400 | */ |
| 401 | #define SQLITE_VERSION "3.19.1" |
| 402 | #define SQLITE_VERSION_NUMBER 3019001 |
| 403 | #define SQLITE_SOURCE_ID "2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86" |
| 404 | |
| 405 | /* |
| 406 | ** CAPI3REF: Run-Time Library Version Numbers |
| 407 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 408 | ** |
| @@ -92630,14 +92630,16 @@ | |
| 92630 | testcase( pExpr->op==TK_COLUMN ); |
| 92631 | testcase( pExpr->op==TK_AGG_FUNCTION ); |
| 92632 | testcase( pExpr->op==TK_AGG_COLUMN ); |
| 92633 | if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){ |
| 92634 | return WRC_Continue; |
| 92635 | }else{ |
| 92636 | pWalker->eCode = 0; |
| 92637 | return WRC_Abort; |
| 92638 | } |
| 92639 | case TK_VARIABLE: |
| 92640 | if( pWalker->eCode==5 ){ |
| 92641 | /* Silently convert bound parameters that appear inside of CREATE |
| 92642 | ** statements into a NULL when parsing the CREATE statement text out |
| 92643 | ** of the sqlite_master table */ |
| @@ -120022,10 +120024,18 @@ | |
| 120022 | isLeftJoin = 1; |
| 120023 | if( pSubSrc->nSrc>1 || isAgg ){ |
| 120024 | return 0; /* Restriction (3) */ |
| 120025 | } |
| 120026 | } |
| 120027 | |
| 120028 | /* Restriction 17: If the sub-query is a compound SELECT, then it must |
| 120029 | ** use only the UNION ALL operator. And none of the simple select queries |
| 120030 | ** that make up the compound SELECT are allowed to be aggregate or distinct |
| 120031 | ** queries. |
| @@ -120275,11 +120285,11 @@ | |
| 120275 | assert( pSub->pPrior==0 ); |
| 120276 | pParent->pOrderBy = pOrderBy; |
| 120277 | pSub->pOrderBy = 0; |
| 120278 | } |
| 120279 | pWhere = sqlite3ExprDup(db, pSub->pWhere, 0); |
| 120280 | if( isLeftJoin ){ |
| 120281 | setJoinExpr(pWhere, iNewParent); |
| 120282 | } |
| 120283 | if( subqueryIsAgg ){ |
| 120284 | assert( pParent->pHaving==0 ); |
| 120285 | pParent->pHaving = pParent->pWhere; |
| @@ -130284,15 +130294,15 @@ | |
| 130284 | */ |
| 130285 | SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){ |
| 130286 | Bitmask mask; |
| 130287 | if( p==0 ) return 0; |
| 130288 | if( p->op==TK_COLUMN ){ |
| 130289 | mask = sqlite3WhereGetMask(pMaskSet, p->iTable); |
| 130290 | return mask; |
| 130291 | } |
| 130292 | assert( !ExprHasProperty(p, EP_TokenOnly) ); |
| 130293 | mask = p->pRight ? sqlite3WhereExprUsage(pMaskSet, p->pRight) : 0; |
| 130294 | if( p->pLeft ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft); |
| 130295 | if( ExprHasProperty(p, EP_xIsSelect) ){ |
| 130296 | mask |= exprSelectUsage(pMaskSet, p->x.pSelect); |
| 130297 | }else if( p->x.pList ){ |
| 130298 | mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList); |
| @@ -199044,11 +199054,11 @@ | |
| 199044 | int nArg, /* Number of args */ |
| 199045 | sqlite3_value **apUnused /* Function arguments */ |
| 199046 | ){ |
| 199047 | assert( nArg==0 ); |
| 199048 | UNUSED_PARAM2(nArg, apUnused); |
| 199049 | sqlite3_result_text(pCtx, "fts5: 2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86", -1, SQLITE_TRANSIENT); |
| 199050 | } |
| 199051 | |
| 199052 | static int fts5Init(sqlite3 *db){ |
| 199053 | static const sqlite3_module fts5Mod = { |
| 199054 | /* iVersion */ 2, |
| 199055 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.19.2. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -396,13 +396,13 @@ | |
| 396 | ** |
| 397 | ** See also: [sqlite3_libversion()], |
| 398 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 399 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 400 | */ |
| 401 | #define SQLITE_VERSION "3.19.2" |
| 402 | #define SQLITE_VERSION_NUMBER 3019002 |
| 403 | #define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9" |
| 404 | |
| 405 | /* |
| 406 | ** CAPI3REF: Run-Time Library Version Numbers |
| 407 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 408 | ** |
| @@ -92630,14 +92630,16 @@ | |
| 92630 | testcase( pExpr->op==TK_COLUMN ); |
| 92631 | testcase( pExpr->op==TK_AGG_FUNCTION ); |
| 92632 | testcase( pExpr->op==TK_AGG_COLUMN ); |
| 92633 | if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){ |
| 92634 | return WRC_Continue; |
| 92635 | } |
| 92636 | /* Fall through */ |
| 92637 | case TK_IF_NULL_ROW: |
| 92638 | testcase( pExpr->op==TK_IF_NULL_ROW ); |
| 92639 | pWalker->eCode = 0; |
| 92640 | return WRC_Abort; |
| 92641 | case TK_VARIABLE: |
| 92642 | if( pWalker->eCode==5 ){ |
| 92643 | /* Silently convert bound parameters that appear inside of CREATE |
| 92644 | ** statements into a NULL when parsing the CREATE statement text out |
| 92645 | ** of the sqlite_master table */ |
| @@ -120022,10 +120024,18 @@ | |
| 120024 | isLeftJoin = 1; |
| 120025 | if( pSubSrc->nSrc>1 || isAgg ){ |
| 120026 | return 0; /* Restriction (3) */ |
| 120027 | } |
| 120028 | } |
| 120029 | #ifdef SQLITE_EXTRA_IFNULLROW |
| 120030 | else if( iFrom>0 && !isAgg ){ |
| 120031 | /* Setting isLeftJoin to -1 causes OP_IfNullRow opcodes to be generated for |
| 120032 | ** every reference to any result column from subquery in a join, even though |
| 120033 | ** they are not necessary. This will stress-test the OP_IfNullRow opcode. */ |
| 120034 | isLeftJoin = -1; |
| 120035 | } |
| 120036 | #endif |
| 120037 | |
| 120038 | /* Restriction 17: If the sub-query is a compound SELECT, then it must |
| 120039 | ** use only the UNION ALL operator. And none of the simple select queries |
| 120040 | ** that make up the compound SELECT are allowed to be aggregate or distinct |
| 120041 | ** queries. |
| @@ -120275,11 +120285,11 @@ | |
| 120285 | assert( pSub->pPrior==0 ); |
| 120286 | pParent->pOrderBy = pOrderBy; |
| 120287 | pSub->pOrderBy = 0; |
| 120288 | } |
| 120289 | pWhere = sqlite3ExprDup(db, pSub->pWhere, 0); |
| 120290 | if( isLeftJoin>0 ){ |
| 120291 | setJoinExpr(pWhere, iNewParent); |
| 120292 | } |
| 120293 | if( subqueryIsAgg ){ |
| 120294 | assert( pParent->pHaving==0 ); |
| 120295 | pParent->pHaving = pParent->pWhere; |
| @@ -130284,15 +130294,15 @@ | |
| 130294 | */ |
| 130295 | SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){ |
| 130296 | Bitmask mask; |
| 130297 | if( p==0 ) return 0; |
| 130298 | if( p->op==TK_COLUMN ){ |
| 130299 | return sqlite3WhereGetMask(pMaskSet, p->iTable); |
| 130300 | } |
| 130301 | mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0; |
| 130302 | assert( !ExprHasProperty(p, EP_TokenOnly) ); |
| 130303 | if( p->pRight ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pRight); |
| 130304 | if( p->pLeft ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft); |
| 130305 | if( ExprHasProperty(p, EP_xIsSelect) ){ |
| 130306 | mask |= exprSelectUsage(pMaskSet, p->x.pSelect); |
| 130307 | }else if( p->x.pList ){ |
| 130308 | mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList); |
| @@ -199044,11 +199054,11 @@ | |
| 199054 | int nArg, /* Number of args */ |
| 199055 | sqlite3_value **apUnused /* Function arguments */ |
| 199056 | ){ |
| 199057 | assert( nArg==0 ); |
| 199058 | UNUSED_PARAM2(nArg, apUnused); |
| 199059 | sqlite3_result_text(pCtx, "fts5: 2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9", -1, SQLITE_TRANSIENT); |
| 199060 | } |
| 199061 | |
| 199062 | static int fts5Init(sqlite3 *db){ |
| 199063 | static const sqlite3_module fts5Mod = { |
| 199064 | /* iVersion */ 2, |
| 199065 |
+3
-3
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -119,13 +119,13 @@ | ||
| 119 | 119 | ** |
| 120 | 120 | ** See also: [sqlite3_libversion()], |
| 121 | 121 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 122 | 122 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 123 | 123 | */ |
| 124 | -#define SQLITE_VERSION "3.19.1" | |
| 125 | -#define SQLITE_VERSION_NUMBER 3019001 | |
| 126 | -#define SQLITE_SOURCE_ID "2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86" | |
| 124 | +#define SQLITE_VERSION "3.19.2" | |
| 125 | +#define SQLITE_VERSION_NUMBER 3019002 | |
| 126 | +#define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9" | |
| 127 | 127 | |
| 128 | 128 | /* |
| 129 | 129 | ** CAPI3REF: Run-Time Library Version Numbers |
| 130 | 130 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 131 | 131 | ** |
| 132 | 132 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -119,13 +119,13 @@ | |
| 119 | ** |
| 120 | ** See also: [sqlite3_libversion()], |
| 121 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 122 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 123 | */ |
| 124 | #define SQLITE_VERSION "3.19.1" |
| 125 | #define SQLITE_VERSION_NUMBER 3019001 |
| 126 | #define SQLITE_SOURCE_ID "2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86" |
| 127 | |
| 128 | /* |
| 129 | ** CAPI3REF: Run-Time Library Version Numbers |
| 130 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 131 | ** |
| 132 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -119,13 +119,13 @@ | |
| 119 | ** |
| 120 | ** See also: [sqlite3_libversion()], |
| 121 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 122 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 123 | */ |
| 124 | #define SQLITE_VERSION "3.19.2" |
| 125 | #define SQLITE_VERSION_NUMBER 3019002 |
| 126 | #define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9" |
| 127 | |
| 128 | /* |
| 129 | ** CAPI3REF: Run-Time Library Version Numbers |
| 130 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 131 | ** |
| 132 |