Fossil SCM

Update the built-in SQLite to version 3.19.2.

drh 2017-05-25 16:59 trunk
Commit 418ac81caed19c1725a860efd301919720c42971a2a09b4acf6e80cb4082504d
2 files changed +22 -12 +3 -3
+22 -12
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
11
/******************************************************************************
22
** 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
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
77
** of 5% or more are commonly seen when SQLite is compiled as a single
88
** translation unit.
@@ -396,13 +396,13 @@
396396
**
397397
** See also: [sqlite3_libversion()],
398398
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
399399
** [sqlite_version()] and [sqlite_source_id()].
400400
*/
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"
404404
405405
/*
406406
** CAPI3REF: Run-Time Library Version Numbers
407407
** KEYWORDS: sqlite3_version sqlite3_sourceid
408408
**
@@ -92630,14 +92630,16 @@
9263092630
testcase( pExpr->op==TK_COLUMN );
9263192631
testcase( pExpr->op==TK_AGG_FUNCTION );
9263292632
testcase( pExpr->op==TK_AGG_COLUMN );
9263392633
if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){
9263492634
return WRC_Continue;
92635
- }else{
92636
- pWalker->eCode = 0;
92637
- return WRC_Abort;
9263892635
}
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;
9263992641
case TK_VARIABLE:
9264092642
if( pWalker->eCode==5 ){
9264192643
/* Silently convert bound parameters that appear inside of CREATE
9264292644
** statements into a NULL when parsing the CREATE statement text out
9264392645
** of the sqlite_master table */
@@ -120022,10 +120024,18 @@
120022120024
isLeftJoin = 1;
120023120025
if( pSubSrc->nSrc>1 || isAgg ){
120024120026
return 0; /* Restriction (3) */
120025120027
}
120026120028
}
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
120027120037
120028120038
/* Restriction 17: If the sub-query is a compound SELECT, then it must
120029120039
** use only the UNION ALL operator. And none of the simple select queries
120030120040
** that make up the compound SELECT are allowed to be aggregate or distinct
120031120041
** queries.
@@ -120275,11 +120285,11 @@
120275120285
assert( pSub->pPrior==0 );
120276120286
pParent->pOrderBy = pOrderBy;
120277120287
pSub->pOrderBy = 0;
120278120288
}
120279120289
pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
120280
- if( isLeftJoin ){
120290
+ if( isLeftJoin>0 ){
120281120291
setJoinExpr(pWhere, iNewParent);
120282120292
}
120283120293
if( subqueryIsAgg ){
120284120294
assert( pParent->pHaving==0 );
120285120295
pParent->pHaving = pParent->pWhere;
@@ -130284,15 +130294,15 @@
130284130294
*/
130285130295
SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){
130286130296
Bitmask mask;
130287130297
if( p==0 ) return 0;
130288130298
if( p->op==TK_COLUMN ){
130289
- mask = sqlite3WhereGetMask(pMaskSet, p->iTable);
130290
- return mask;
130299
+ return sqlite3WhereGetMask(pMaskSet, p->iTable);
130291130300
}
130301
+ mask = (p->op==TK_IF_NULL_ROW) ? sqlite3WhereGetMask(pMaskSet, p->iTable) : 0;
130292130302
assert( !ExprHasProperty(p, EP_TokenOnly) );
130293
- mask = p->pRight ? sqlite3WhereExprUsage(pMaskSet, p->pRight) : 0;
130303
+ if( p->pRight ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pRight);
130294130304
if( p->pLeft ) mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft);
130295130305
if( ExprHasProperty(p, EP_xIsSelect) ){
130296130306
mask |= exprSelectUsage(pMaskSet, p->x.pSelect);
130297130307
}else if( p->x.pList ){
130298130308
mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList);
@@ -199044,11 +199054,11 @@
199044199054
int nArg, /* Number of args */
199045199055
sqlite3_value **apUnused /* Function arguments */
199046199056
){
199047199057
assert( nArg==0 );
199048199058
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);
199050199060
}
199051199061
199052199062
static int fts5Init(sqlite3 *db){
199053199063
static const sqlite3_module fts5Mod = {
199054199064
/* iVersion */ 2,
199055199065
--- 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 @@
119119
**
120120
** See also: [sqlite3_libversion()],
121121
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122122
** [sqlite_version()] and [sqlite_source_id()].
123123
*/
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"
127127
128128
/*
129129
** CAPI3REF: Run-Time Library Version Numbers
130130
** KEYWORDS: sqlite3_version sqlite3_sourceid
131131
**
132132
--- 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

Keyboard Shortcuts

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