Fossil SCM

Update the built-in SQLite to the 3.16.1 release

jan.nijtmans 2017-01-04 09:34 trunk
Commit a8cd1e542787addc12d9cc393ab2252548cf0fbb
+56 -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.16.0. By combining all the individual C code files into this
3
+** version 3.16.1. 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.
@@ -379,13 +379,13 @@
379379
**
380380
** See also: [sqlite3_libversion()],
381381
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382382
** [sqlite_version()] and [sqlite_source_id()].
383383
*/
384
-#define SQLITE_VERSION "3.16.0"
385
-#define SQLITE_VERSION_NUMBER 3016000
386
-#define SQLITE_SOURCE_ID "2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf"
384
+#define SQLITE_VERSION "3.16.1"
385
+#define SQLITE_VERSION_NUMBER 3016001
386
+#define SQLITE_SOURCE_ID "2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd"
387387
388388
/*
389389
** CAPI3REF: Run-Time Library Version Numbers
390390
** KEYWORDS: sqlite3_version sqlite3_sourceid
391391
**
@@ -90661,13 +90661,14 @@
9066190661
Expr *pRet;
9066290662
if( pVector->op==TK_SELECT ){
9066390663
assert( pVector->flags & EP_xIsSelect );
9066490664
/* The TK_SELECT_COLUMN Expr node:
9066590665
**
90666
- ** pLeft: pVector containing TK_SELECT
90666
+ ** pLeft: pVector containing TK_SELECT. Not deleted.
9066790667
** pRight: not used. But recursively deleted.
9066890668
** iColumn: Index of a column in pVector
90669
+ ** iTable: 0 or the number of columns on the LHS of an assignment
9066990670
** pLeft->iTable: First in an array of register holding result, or 0
9067090671
** if the result is not yet computed.
9067190672
**
9067290673
** sqlite3ExprDelete() specifically skips the recursive delete of
9067390674
** pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector
@@ -91335,11 +91336,11 @@
9133591336
static int dupedExprStructSize(Expr *p, int flags){
9133691337
int nSize;
9133791338
assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */
9133891339
assert( EXPR_FULLSIZE<=0xfff );
9133991340
assert( (0xfff & (EP_Reduced|EP_TokenOnly))==0 );
91340
- if( 0==flags ){
91341
+ if( 0==flags || p->op==TK_SELECT_COLUMN ){
9134191342
nSize = EXPR_FULLSIZE;
9134291343
}else{
9134391344
assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );
9134491345
assert( !ExprHasProperty(p, EP_FromJoin) );
9134591346
assert( !ExprHasProperty(p, EP_MemToken) );
@@ -91478,10 +91479,12 @@
9147891479
}
9147991480
}else{
9148091481
if( !ExprHasProperty(p, EP_TokenOnly|EP_Leaf) ){
9148191482
if( pNew->op==TK_SELECT_COLUMN ){
9148291483
pNew->pLeft = p->pLeft;
91484
+ assert( p->iColumn==0 || p->pRight==0 );
91485
+ assert( p->pRight==0 || p->pRight==p->pLeft );
9148391486
}else{
9148491487
pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
9148591488
}
9148691489
pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
9148791490
}
@@ -91540,10 +91543,11 @@
9154091543
}
9154191544
SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
9154291545
ExprList *pNew;
9154391546
struct ExprList_item *pItem, *pOldItem;
9154491547
int i;
91548
+ Expr *pPriorSelectCol = 0;
9154591549
assert( db!=0 );
9154691550
if( p==0 ) return 0;
9154791551
pNew = sqlite3DbMallocRawNN(db, sizeof(*pNew) );
9154891552
if( pNew==0 ) return 0;
9154991553
pNew->nExpr = i = p->nExpr;
@@ -91554,11 +91558,28 @@
9155491558
return 0;
9155591559
}
9155691560
pOldItem = p->a;
9155791561
for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
9155891562
Expr *pOldExpr = pOldItem->pExpr;
91563
+ Expr *pNewExpr;
9155991564
pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
91565
+ if( pOldExpr
91566
+ && pOldExpr->op==TK_SELECT_COLUMN
91567
+ && (pNewExpr = pItem->pExpr)!=0
91568
+ ){
91569
+ assert( pNewExpr->iColumn==0 || i>0 );
91570
+ if( pNewExpr->iColumn==0 ){
91571
+ assert( pOldExpr->pLeft==pOldExpr->pRight );
91572
+ pPriorSelectCol = pNewExpr->pLeft = pNewExpr->pRight;
91573
+ }else{
91574
+ assert( i>0 );
91575
+ assert( pItem[-1].pExpr!=0 );
91576
+ assert( pNewExpr->iColumn==pItem[-1].pExpr->iColumn+1 );
91577
+ assert( pPriorSelectCol==pItem[-1].pExpr->pLeft );
91578
+ pNewExpr->pLeft = pPriorSelectCol;
91579
+ }
91580
+ }
9156091581
pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
9156191582
pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
9156291583
pItem->sortOrder = pOldItem->sortOrder;
9156391584
pItem->done = 0;
9156491585
pItem->bSpanIsTab = pOldItem->bSpanIsTab;
@@ -91746,30 +91767,45 @@
9174691767
int iFirst = pList ? pList->nExpr : 0;
9174791768
/* pColumns can only be NULL due to an OOM but an OOM will cause an
9174891769
** exit prior to this routine being invoked */
9174991770
if( NEVER(pColumns==0) ) goto vector_append_error;
9175091771
if( pExpr==0 ) goto vector_append_error;
91751
- n = sqlite3ExprVectorSize(pExpr);
91752
- if( pColumns->nId!=n ){
91772
+
91773
+ /* If the RHS is a vector, then we can immediately check to see that
91774
+ ** the size of the RHS and LHS match. But if the RHS is a SELECT,
91775
+ ** wildcards ("*") in the result set of the SELECT must be expanded before
91776
+ ** we can do the size check, so defer the size check until code generation.
91777
+ */
91778
+ if( pExpr->op!=TK_SELECT && pColumns->nId!=(n=sqlite3ExprVectorSize(pExpr)) ){
9175391779
sqlite3ErrorMsg(pParse, "%d columns assigned %d values",
9175491780
pColumns->nId, n);
9175591781
goto vector_append_error;
9175691782
}
91757
- for(i=0; i<n; i++){
91783
+
91784
+ for(i=0; i<pColumns->nId; i++){
9175891785
Expr *pSubExpr = sqlite3ExprForVectorField(pParse, pExpr, i);
9175991786
pList = sqlite3ExprListAppend(pParse, pList, pSubExpr);
9176091787
if( pList ){
9176191788
assert( pList->nExpr==iFirst+i+1 );
9176291789
pList->a[pList->nExpr-1].zName = pColumns->a[i].zName;
9176391790
pColumns->a[i].zName = 0;
9176491791
}
9176591792
}
91793
+
9176691794
if( pExpr->op==TK_SELECT ){
9176791795
if( pList && pList->a[iFirst].pExpr ){
91768
- assert( pList->a[iFirst].pExpr->op==TK_SELECT_COLUMN );
91769
- pList->a[iFirst].pExpr->pRight = pExpr;
91796
+ Expr *pFirst = pList->a[iFirst].pExpr;
91797
+ assert( pFirst->op==TK_SELECT_COLUMN );
91798
+
91799
+ /* Store the SELECT statement in pRight so it will be deleted when
91800
+ ** sqlite3ExprListDelete() is called */
91801
+ pFirst->pRight = pExpr;
9177091802
pExpr = 0;
91803
+
91804
+ /* Remember the size of the LHS in iTable so that we can check that
91805
+ ** the RHS and LHS sizes match during code generation. */
91806
+ pFirst->iTable = pColumns->nId;
9177191807
}
9177291808
}
9177391809
9177491810
vector_append_error:
9177591811
sqlite3ExprDelete(db, pExpr);
@@ -93959,12 +93995,20 @@
9395993995
return sqlite3CodeSubselect(pParse, pExpr, 0, 0);
9396093996
}
9396193997
break;
9396293998
}
9396393999
case TK_SELECT_COLUMN: {
94000
+ int n;
9396494001
if( pExpr->pLeft->iTable==0 ){
9396594002
pExpr->pLeft->iTable = sqlite3CodeSubselect(pParse, pExpr->pLeft, 0, 0);
94003
+ }
94004
+ assert( pExpr->iTable==0 || pExpr->pLeft->op==TK_SELECT );
94005
+ if( pExpr->iTable
94006
+ && pExpr->iTable!=(n = sqlite3ExprVectorSize(pExpr->pLeft))
94007
+ ){
94008
+ sqlite3ErrorMsg(pParse, "%d columns assigned %d values",
94009
+ pExpr->iTable, n);
9396694010
}
9396794011
return pExpr->pLeft->iTable + pExpr->iColumn;
9396894012
}
9396994013
case TK_IN: {
9397094014
int destIfFalse = sqlite3VdbeMakeLabel(v);
@@ -196770,11 +196814,11 @@
196770196814
int nArg, /* Number of args */
196771196815
sqlite3_value **apUnused /* Function arguments */
196772196816
){
196773196817
assert( nArg==0 );
196774196818
UNUSED_PARAM2(nArg, apUnused);
196775
- sqlite3_result_text(pCtx, "fts5: 2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf", -1, SQLITE_TRANSIENT);
196819
+ sqlite3_result_text(pCtx, "fts5: 2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd", -1, SQLITE_TRANSIENT);
196776196820
}
196777196821
196778196822
static int fts5Init(sqlite3 *db){
196779196823
static const sqlite3_module fts5Mod = {
196780196824
/* iVersion */ 2,
196781196825
--- 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.16.0. 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.
@@ -379,13 +379,13 @@
379 **
380 ** See also: [sqlite3_libversion()],
381 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382 ** [sqlite_version()] and [sqlite_source_id()].
383 */
384 #define SQLITE_VERSION "3.16.0"
385 #define SQLITE_VERSION_NUMBER 3016000
386 #define SQLITE_SOURCE_ID "2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf"
387
388 /*
389 ** CAPI3REF: Run-Time Library Version Numbers
390 ** KEYWORDS: sqlite3_version sqlite3_sourceid
391 **
@@ -90661,13 +90661,14 @@
90661 Expr *pRet;
90662 if( pVector->op==TK_SELECT ){
90663 assert( pVector->flags & EP_xIsSelect );
90664 /* The TK_SELECT_COLUMN Expr node:
90665 **
90666 ** pLeft: pVector containing TK_SELECT
90667 ** pRight: not used. But recursively deleted.
90668 ** iColumn: Index of a column in pVector
 
90669 ** pLeft->iTable: First in an array of register holding result, or 0
90670 ** if the result is not yet computed.
90671 **
90672 ** sqlite3ExprDelete() specifically skips the recursive delete of
90673 ** pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector
@@ -91335,11 +91336,11 @@
91335 static int dupedExprStructSize(Expr *p, int flags){
91336 int nSize;
91337 assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */
91338 assert( EXPR_FULLSIZE<=0xfff );
91339 assert( (0xfff & (EP_Reduced|EP_TokenOnly))==0 );
91340 if( 0==flags ){
91341 nSize = EXPR_FULLSIZE;
91342 }else{
91343 assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );
91344 assert( !ExprHasProperty(p, EP_FromJoin) );
91345 assert( !ExprHasProperty(p, EP_MemToken) );
@@ -91478,10 +91479,12 @@
91478 }
91479 }else{
91480 if( !ExprHasProperty(p, EP_TokenOnly|EP_Leaf) ){
91481 if( pNew->op==TK_SELECT_COLUMN ){
91482 pNew->pLeft = p->pLeft;
 
 
91483 }else{
91484 pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
91485 }
91486 pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
91487 }
@@ -91540,10 +91543,11 @@
91540 }
91541 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
91542 ExprList *pNew;
91543 struct ExprList_item *pItem, *pOldItem;
91544 int i;
 
91545 assert( db!=0 );
91546 if( p==0 ) return 0;
91547 pNew = sqlite3DbMallocRawNN(db, sizeof(*pNew) );
91548 if( pNew==0 ) return 0;
91549 pNew->nExpr = i = p->nExpr;
@@ -91554,11 +91558,28 @@
91554 return 0;
91555 }
91556 pOldItem = p->a;
91557 for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
91558 Expr *pOldExpr = pOldItem->pExpr;
 
91559 pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91560 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
91561 pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
91562 pItem->sortOrder = pOldItem->sortOrder;
91563 pItem->done = 0;
91564 pItem->bSpanIsTab = pOldItem->bSpanIsTab;
@@ -91746,30 +91767,45 @@
91746 int iFirst = pList ? pList->nExpr : 0;
91747 /* pColumns can only be NULL due to an OOM but an OOM will cause an
91748 ** exit prior to this routine being invoked */
91749 if( NEVER(pColumns==0) ) goto vector_append_error;
91750 if( pExpr==0 ) goto vector_append_error;
91751 n = sqlite3ExprVectorSize(pExpr);
91752 if( pColumns->nId!=n ){
 
 
 
 
 
91753 sqlite3ErrorMsg(pParse, "%d columns assigned %d values",
91754 pColumns->nId, n);
91755 goto vector_append_error;
91756 }
91757 for(i=0; i<n; i++){
 
91758 Expr *pSubExpr = sqlite3ExprForVectorField(pParse, pExpr, i);
91759 pList = sqlite3ExprListAppend(pParse, pList, pSubExpr);
91760 if( pList ){
91761 assert( pList->nExpr==iFirst+i+1 );
91762 pList->a[pList->nExpr-1].zName = pColumns->a[i].zName;
91763 pColumns->a[i].zName = 0;
91764 }
91765 }
 
91766 if( pExpr->op==TK_SELECT ){
91767 if( pList && pList->a[iFirst].pExpr ){
91768 assert( pList->a[iFirst].pExpr->op==TK_SELECT_COLUMN );
91769 pList->a[iFirst].pExpr->pRight = pExpr;
 
 
 
 
91770 pExpr = 0;
 
 
 
 
91771 }
91772 }
91773
91774 vector_append_error:
91775 sqlite3ExprDelete(db, pExpr);
@@ -93959,12 +93995,20 @@
93959 return sqlite3CodeSubselect(pParse, pExpr, 0, 0);
93960 }
93961 break;
93962 }
93963 case TK_SELECT_COLUMN: {
 
93964 if( pExpr->pLeft->iTable==0 ){
93965 pExpr->pLeft->iTable = sqlite3CodeSubselect(pParse, pExpr->pLeft, 0, 0);
 
 
 
 
 
 
 
93966 }
93967 return pExpr->pLeft->iTable + pExpr->iColumn;
93968 }
93969 case TK_IN: {
93970 int destIfFalse = sqlite3VdbeMakeLabel(v);
@@ -196770,11 +196814,11 @@
196770 int nArg, /* Number of args */
196771 sqlite3_value **apUnused /* Function arguments */
196772 ){
196773 assert( nArg==0 );
196774 UNUSED_PARAM2(nArg, apUnused);
196775 sqlite3_result_text(pCtx, "fts5: 2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf", -1, SQLITE_TRANSIENT);
196776 }
196777
196778 static int fts5Init(sqlite3 *db){
196779 static const sqlite3_module fts5Mod = {
196780 /* iVersion */ 2,
196781
--- 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.16.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.
@@ -379,13 +379,13 @@
379 **
380 ** See also: [sqlite3_libversion()],
381 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382 ** [sqlite_version()] and [sqlite_source_id()].
383 */
384 #define SQLITE_VERSION "3.16.1"
385 #define SQLITE_VERSION_NUMBER 3016001
386 #define SQLITE_SOURCE_ID "2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd"
387
388 /*
389 ** CAPI3REF: Run-Time Library Version Numbers
390 ** KEYWORDS: sqlite3_version sqlite3_sourceid
391 **
@@ -90661,13 +90661,14 @@
90661 Expr *pRet;
90662 if( pVector->op==TK_SELECT ){
90663 assert( pVector->flags & EP_xIsSelect );
90664 /* The TK_SELECT_COLUMN Expr node:
90665 **
90666 ** pLeft: pVector containing TK_SELECT. Not deleted.
90667 ** pRight: not used. But recursively deleted.
90668 ** iColumn: Index of a column in pVector
90669 ** iTable: 0 or the number of columns on the LHS of an assignment
90670 ** pLeft->iTable: First in an array of register holding result, or 0
90671 ** if the result is not yet computed.
90672 **
90673 ** sqlite3ExprDelete() specifically skips the recursive delete of
90674 ** pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector
@@ -91335,11 +91336,11 @@
91336 static int dupedExprStructSize(Expr *p, int flags){
91337 int nSize;
91338 assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */
91339 assert( EXPR_FULLSIZE<=0xfff );
91340 assert( (0xfff & (EP_Reduced|EP_TokenOnly))==0 );
91341 if( 0==flags || p->op==TK_SELECT_COLUMN ){
91342 nSize = EXPR_FULLSIZE;
91343 }else{
91344 assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );
91345 assert( !ExprHasProperty(p, EP_FromJoin) );
91346 assert( !ExprHasProperty(p, EP_MemToken) );
@@ -91478,10 +91479,12 @@
91479 }
91480 }else{
91481 if( !ExprHasProperty(p, EP_TokenOnly|EP_Leaf) ){
91482 if( pNew->op==TK_SELECT_COLUMN ){
91483 pNew->pLeft = p->pLeft;
91484 assert( p->iColumn==0 || p->pRight==0 );
91485 assert( p->pRight==0 || p->pRight==p->pLeft );
91486 }else{
91487 pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
91488 }
91489 pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
91490 }
@@ -91540,10 +91543,11 @@
91543 }
91544 SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
91545 ExprList *pNew;
91546 struct ExprList_item *pItem, *pOldItem;
91547 int i;
91548 Expr *pPriorSelectCol = 0;
91549 assert( db!=0 );
91550 if( p==0 ) return 0;
91551 pNew = sqlite3DbMallocRawNN(db, sizeof(*pNew) );
91552 if( pNew==0 ) return 0;
91553 pNew->nExpr = i = p->nExpr;
@@ -91554,11 +91558,28 @@
91558 return 0;
91559 }
91560 pOldItem = p->a;
91561 for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
91562 Expr *pOldExpr = pOldItem->pExpr;
91563 Expr *pNewExpr;
91564 pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
91565 if( pOldExpr
91566 && pOldExpr->op==TK_SELECT_COLUMN
91567 && (pNewExpr = pItem->pExpr)!=0
91568 ){
91569 assert( pNewExpr->iColumn==0 || i>0 );
91570 if( pNewExpr->iColumn==0 ){
91571 assert( pOldExpr->pLeft==pOldExpr->pRight );
91572 pPriorSelectCol = pNewExpr->pLeft = pNewExpr->pRight;
91573 }else{
91574 assert( i>0 );
91575 assert( pItem[-1].pExpr!=0 );
91576 assert( pNewExpr->iColumn==pItem[-1].pExpr->iColumn+1 );
91577 assert( pPriorSelectCol==pItem[-1].pExpr->pLeft );
91578 pNewExpr->pLeft = pPriorSelectCol;
91579 }
91580 }
91581 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
91582 pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
91583 pItem->sortOrder = pOldItem->sortOrder;
91584 pItem->done = 0;
91585 pItem->bSpanIsTab = pOldItem->bSpanIsTab;
@@ -91746,30 +91767,45 @@
91767 int iFirst = pList ? pList->nExpr : 0;
91768 /* pColumns can only be NULL due to an OOM but an OOM will cause an
91769 ** exit prior to this routine being invoked */
91770 if( NEVER(pColumns==0) ) goto vector_append_error;
91771 if( pExpr==0 ) goto vector_append_error;
91772
91773 /* If the RHS is a vector, then we can immediately check to see that
91774 ** the size of the RHS and LHS match. But if the RHS is a SELECT,
91775 ** wildcards ("*") in the result set of the SELECT must be expanded before
91776 ** we can do the size check, so defer the size check until code generation.
91777 */
91778 if( pExpr->op!=TK_SELECT && pColumns->nId!=(n=sqlite3ExprVectorSize(pExpr)) ){
91779 sqlite3ErrorMsg(pParse, "%d columns assigned %d values",
91780 pColumns->nId, n);
91781 goto vector_append_error;
91782 }
91783
91784 for(i=0; i<pColumns->nId; i++){
91785 Expr *pSubExpr = sqlite3ExprForVectorField(pParse, pExpr, i);
91786 pList = sqlite3ExprListAppend(pParse, pList, pSubExpr);
91787 if( pList ){
91788 assert( pList->nExpr==iFirst+i+1 );
91789 pList->a[pList->nExpr-1].zName = pColumns->a[i].zName;
91790 pColumns->a[i].zName = 0;
91791 }
91792 }
91793
91794 if( pExpr->op==TK_SELECT ){
91795 if( pList && pList->a[iFirst].pExpr ){
91796 Expr *pFirst = pList->a[iFirst].pExpr;
91797 assert( pFirst->op==TK_SELECT_COLUMN );
91798
91799 /* Store the SELECT statement in pRight so it will be deleted when
91800 ** sqlite3ExprListDelete() is called */
91801 pFirst->pRight = pExpr;
91802 pExpr = 0;
91803
91804 /* Remember the size of the LHS in iTable so that we can check that
91805 ** the RHS and LHS sizes match during code generation. */
91806 pFirst->iTable = pColumns->nId;
91807 }
91808 }
91809
91810 vector_append_error:
91811 sqlite3ExprDelete(db, pExpr);
@@ -93959,12 +93995,20 @@
93995 return sqlite3CodeSubselect(pParse, pExpr, 0, 0);
93996 }
93997 break;
93998 }
93999 case TK_SELECT_COLUMN: {
94000 int n;
94001 if( pExpr->pLeft->iTable==0 ){
94002 pExpr->pLeft->iTable = sqlite3CodeSubselect(pParse, pExpr->pLeft, 0, 0);
94003 }
94004 assert( pExpr->iTable==0 || pExpr->pLeft->op==TK_SELECT );
94005 if( pExpr->iTable
94006 && pExpr->iTable!=(n = sqlite3ExprVectorSize(pExpr->pLeft))
94007 ){
94008 sqlite3ErrorMsg(pParse, "%d columns assigned %d values",
94009 pExpr->iTable, n);
94010 }
94011 return pExpr->pLeft->iTable + pExpr->iColumn;
94012 }
94013 case TK_IN: {
94014 int destIfFalse = sqlite3VdbeMakeLabel(v);
@@ -196770,11 +196814,11 @@
196814 int nArg, /* Number of args */
196815 sqlite3_value **apUnused /* Function arguments */
196816 ){
196817 assert( nArg==0 );
196818 UNUSED_PARAM2(nArg, apUnused);
196819 sqlite3_result_text(pCtx, "fts5: 2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd", -1, SQLITE_TRANSIENT);
196820 }
196821
196822 static int fts5Init(sqlite3 *db){
196823 static const sqlite3_module fts5Mod = {
196824 /* iVersion */ 2,
196825
+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.16.0"
125
-#define SQLITE_VERSION_NUMBER 3016000
126
-#define SQLITE_SOURCE_ID "2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf"
124
+#define SQLITE_VERSION "3.16.1"
125
+#define SQLITE_VERSION_NUMBER 3016001
126
+#define SQLITE_SOURCE_ID "2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd"
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.16.0"
125 #define SQLITE_VERSION_NUMBER 3016000
126 #define SQLITE_SOURCE_ID "2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf"
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.16.1"
125 #define SQLITE_VERSION_NUMBER 3016001
126 #define SQLITE_SOURCE_ID "2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd"
127
128 /*
129 ** CAPI3REF: Run-Time Library Version Numbers
130 ** KEYWORDS: sqlite3_version sqlite3_sourceid
131 **
132
--- www/changes.wiki
+++ www/changes.wiki
@@ -31,11 +31,11 @@
3131
* Remove the "fusefs" command from builds that do not have the underlying
3232
support enabled.
3333
* Fixes for incremental git import/export.
3434
* Minor security enhancements to
3535
[./encryptedrepos.wiki|encrypted repositories].
36
- * Update the built-in SQLite to version 3.16.
36
+ * Update the built-in SQLite to version 3.16.1.
3737
* Update the built-in Zlib to version 1.2.10.
3838
3939
<a name='v1_36'></a>
4040
<h2>Changes for Version 1.36 (2016-10-24)</h2>
4141
4242
--- www/changes.wiki
+++ www/changes.wiki
@@ -31,11 +31,11 @@
31 * Remove the "fusefs" command from builds that do not have the underlying
32 support enabled.
33 * Fixes for incremental git import/export.
34 * Minor security enhancements to
35 [./encryptedrepos.wiki|encrypted repositories].
36 * Update the built-in SQLite to version 3.16.
37 * Update the built-in Zlib to version 1.2.10.
38
39 <a name='v1_36'></a>
40 <h2>Changes for Version 1.36 (2016-10-24)</h2>
41
42
--- www/changes.wiki
+++ www/changes.wiki
@@ -31,11 +31,11 @@
31 * Remove the "fusefs" command from builds that do not have the underlying
32 support enabled.
33 * Fixes for incremental git import/export.
34 * Minor security enhancements to
35 [./encryptedrepos.wiki|encrypted repositories].
36 * Update the built-in SQLite to version 3.16.1.
37 * Update the built-in Zlib to version 1.2.10.
38
39 <a name='v1_36'></a>
40 <h2>Changes for Version 1.36 (2016-10-24)</h2>
41
42

Keyboard Shortcuts

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