Fossil SCM

Update the built-in SQLite to the next 3.15.0 beta for testing.

drh 2016-10-12 16:05 trunk
Commit 6ef1500850dbd104995196fcd5adb11304d2d32d
2 files changed +26 -19 +1 -1
+26 -19
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -381,11 +381,11 @@
381381
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382382
** [sqlite_version()] and [sqlite_source_id()].
383383
*/
384384
#define SQLITE_VERSION "3.15.0"
385385
#define SQLITE_VERSION_NUMBER 3015000
386
-#define SQLITE_SOURCE_ID "2016-10-04 12:20:12 3a9d802fda10585654332b314d317250dc5d894e"
386
+#define SQLITE_SOURCE_ID "2016-10-12 15:15:30 61f0526978af667781c57bcc87510e4524efd0d8"
387387
388388
/*
389389
** CAPI3REF: Run-Time Library Version Numbers
390390
** KEYWORDS: sqlite3_version, sqlite3_sourceid
391391
**
@@ -69336,11 +69336,11 @@
6933669336
switch( aff ){
6933769337
case SQLITE_AFF_BLOB: { /* Really a cast to BLOB */
6933869338
if( (pMem->flags & MEM_Blob)==0 ){
6933969339
sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
6934069340
assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
69341
- MemSetTypeFlag(pMem, MEM_Blob);
69341
+ if( pMem->flags & MEM_Str ) MemSetTypeFlag(pMem, MEM_Blob);
6934269342
}else{
6934369343
pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
6934469344
}
6934569345
break;
6934669346
}
@@ -88812,11 +88812,10 @@
8881288812
const char *zId; /* The function name. */
8881388813
FuncDef *pDef; /* Information about the function */
8881488814
u8 enc = ENC(pParse->db); /* The database encoding */
8881588815
8881688816
assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
88817
-// notValid(pParse, pNC, "functions", NC_PartIdx);
8881888817
zId = pExpr->u.zToken;
8881988818
nId = sqlite3Strlen30(zId);
8882088819
pDef = sqlite3FindFunction(pParse->db, zId, n, enc, 0);
8882188820
if( pDef==0 ){
8882288821
pDef = sqlite3FindFunction(pParse->db, zId, -2, enc, 0);
@@ -124663,11 +124662,10 @@
124663124662
**
124664124663
** * the comparison will be performed with no affinity, or
124665124664
** * the affinity change in zAff is guaranteed not to change the value.
124666124665
*/
124667124666
static void updateRangeAffinityStr(
124668
- Parse *pParse, /* Parse context */
124669124667
Expr *pRight, /* RHS of comparison */
124670124668
int n, /* Number of vector elements in comparison */
124671124669
char *zAff /* Affinity string to modify */
124672124670
){
124673124671
int i;
@@ -125749,15 +125747,15 @@
125749125747
assert( (bRev & ~1)==0 );
125750125748
pLevel->iLikeRepCntr <<=1;
125751125749
pLevel->iLikeRepCntr |= bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC);
125752125750
}
125753125751
#endif
125754
- if( pRangeStart==0
125755
- && (j = pIdx->aiColumn[nEq])>=0
125756
- && pIdx->pTable->aCol[j].notNull==0
125757
- ){
125758
- bSeekPastNull = 1;
125752
+ if( pRangeStart==0 ){
125753
+ j = pIdx->aiColumn[nEq];
125754
+ if( (j>=0 && pIdx->pTable->aCol[j].notNull==0) || j==XN_EXPR ){
125755
+ bSeekPastNull = 1;
125756
+ }
125759125757
}
125760125758
}
125761125759
assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
125762125760
125763125761
/* If we are doing a reverse order scan on an ascending index, or
@@ -125803,11 +125801,11 @@
125803125801
){
125804125802
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
125805125803
VdbeCoverage(v);
125806125804
}
125807125805
if( zStartAff ){
125808
- updateRangeAffinityStr(pParse, pRight, nBtm, &zStartAff[nEq]);
125806
+ updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
125809125807
}
125810125808
nConstraint += nBtm;
125811125809
testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
125812125810
if( sqlite3ExprIsVector(pRight)==0 ){
125813125811
disableTerm(pLevel, pRangeStart);
@@ -125853,11 +125851,11 @@
125853125851
){
125854125852
sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
125855125853
VdbeCoverage(v);
125856125854
}
125857125855
if( zEndAff ){
125858
- updateRangeAffinityStr(pParse, pRight, nTop, zEndAff);
125856
+ updateRangeAffinityStr(pRight, nTop, zEndAff);
125859125857
codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);
125860125858
}else{
125861125859
assert( pParse->db->mallocFailed );
125862125860
}
125863125861
nConstraint += nTop;
@@ -130005,11 +130003,11 @@
130005130003
** CREATE INDEX ... ON (a, b, c, d, e)
130006130004
**
130007130005
** then this function would be invoked with nEq=1. The value returned in
130008130006
** this case is 3.
130009130007
*/
130010
-int whereRangeVectorLen(
130008
+static int whereRangeVectorLen(
130011130009
Parse *pParse, /* Parsing context */
130012130010
int iCur, /* Cursor open on pIdx */
130013130011
Index *pIdx, /* The index to be used for a inequality constraint */
130014130012
int nEq, /* Number of prior equality constraints on same index */
130015130013
WhereTerm *pTerm /* The vector inequality constraint */
@@ -131451,11 +131449,11 @@
131451131449
if( rev ) *pRevMask |= MASKBIT(iLoop);
131452131450
revSet = 1;
131453131451
}
131454131452
}
131455131453
if( isMatch ){
131456
- if( iColumn<0 ){
131454
+ if( iColumn==XN_ROWID ){
131457131455
testcase( distinctColumns==0 );
131458131456
distinctColumns = 1;
131459131457
}
131460131458
obSat |= MASKBIT(i);
131461131459
}else{
@@ -131905,15 +131903,20 @@
131905131903
}
131906131904
}else{
131907131905
pWInfo->nOBSat = pFrom->isOrdered;
131908131906
pWInfo->revMask = pFrom->revLoop;
131909131907
if( pWInfo->nOBSat<=0 ){
131908
+ u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;
131910131909
pWInfo->nOBSat = 0;
131911
- if( nLoop>0 && (pFrom->aLoop[nLoop-1]->wsFlags & WHERE_ONEROW)==0 ){
131910
+ if( nLoop>0 && (wsFlags & WHERE_ONEROW)==0
131911
+ && (wsFlags & (WHERE_IPK|WHERE_COLUMN_IN))!=(WHERE_IPK|WHERE_COLUMN_IN)
131912
+ ){
131912131913
Bitmask m = 0;
131913131914
int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom,
131914131915
WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m);
131916
+ testcase( wsFlags & WHERE_IPK );
131917
+ testcase( wsFlags & WHERE_COLUMN_IN );
131915131918
if( rc==pWInfo->pOrderBy->nExpr ){
131916131919
pWInfo->bOrderedInnerLoop = 1;
131917131920
pWInfo->revMask = m;
131918131921
}
131919131922
}
@@ -164296,14 +164299,16 @@
164296164299
char *zSql;
164297164300
sqlite3_stmt *p;
164298164301
int rc;
164299164302
i64 nRow = 0;
164300164303
164301
- if( sqlite3_table_column_metadata(db,pRtree->zDb,"sqlite_stat1",
164302
- 0,0,0,0,0,0)==SQLITE_ERROR ){
164304
+ rc = sqlite3_table_column_metadata(
164305
+ db, pRtree->zDb, "sqlite_stat1",0,0,0,0,0,0
164306
+ );
164307
+ if( rc!=SQLITE_OK ){
164303164308
pRtree->nRowEst = RTREE_DEFAULT_ROWEST;
164304
- return SQLITE_OK;
164309
+ return rc==SQLITE_ERROR ? SQLITE_OK : rc;
164305164310
}
164306164311
zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName);
164307164312
if( zSql==0 ){
164308164313
rc = SQLITE_NOMEM;
164309164314
}else{
@@ -181496,10 +181501,13 @@
181496181501
int nToken, /* Size of token in bytes */
181497181502
int iStartOff, /* Start offset of token */
181498181503
int iEndOff /* End offset of token */
181499181504
){
181500181505
int rc = SQLITE_OK;
181506
+
181507
+ UNUSED_PARAM2(pToken, nToken);
181508
+ UNUSED_PARAM(iEndOff);
181501181509
181502181510
if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){
181503181511
Fts5SFinder *p = (Fts5SFinder*)pContext;
181504181512
if( p->iPos>0 ){
181505181513
int i;
@@ -181652,11 +181660,10 @@
181652181660
for(jj=0; jj<(sFinder.nFirst-1); jj++){
181653181661
if( sFinder.aFirst[jj+1]>io ) break;
181654181662
}
181655181663
181656181664
if( sFinder.aFirst[jj]<io ){
181657
- int nScore;
181658181665
memset(aSeen, 0, nPhrase);
181659181666
rc = fts5SnippetScore(pApi, pFts, nDocsize, aSeen, i,
181660181667
sFinder.aFirst[jj], nToken, &nScore, 0
181661181668
);
181662181669
@@ -195587,11 +195594,11 @@
195587195594
int nArg, /* Number of args */
195588195595
sqlite3_value **apUnused /* Function arguments */
195589195596
){
195590195597
assert( nArg==0 );
195591195598
UNUSED_PARAM2(nArg, apUnused);
195592
- sqlite3_result_text(pCtx, "fts5: 2016-10-04 00:47:26 b10d0f939c82c4de3faa90b86de9ec4a89992856", -1, SQLITE_TRANSIENT);
195599
+ sqlite3_result_text(pCtx, "fts5: 2016-10-10 14:48:36 6624c4964b63e259d5ee006eaa7ec79ddadbd6a6", -1, SQLITE_TRANSIENT);
195593195600
}
195594195601
195595195602
static int fts5Init(sqlite3 *db){
195596195603
static const sqlite3_module fts5Mod = {
195597195604
/* iVersion */ 2,
195598195605
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -381,11 +381,11 @@
381 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382 ** [sqlite_version()] and [sqlite_source_id()].
383 */
384 #define SQLITE_VERSION "3.15.0"
385 #define SQLITE_VERSION_NUMBER 3015000
386 #define SQLITE_SOURCE_ID "2016-10-04 12:20:12 3a9d802fda10585654332b314d317250dc5d894e"
387
388 /*
389 ** CAPI3REF: Run-Time Library Version Numbers
390 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
391 **
@@ -69336,11 +69336,11 @@
69336 switch( aff ){
69337 case SQLITE_AFF_BLOB: { /* Really a cast to BLOB */
69338 if( (pMem->flags & MEM_Blob)==0 ){
69339 sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
69340 assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
69341 MemSetTypeFlag(pMem, MEM_Blob);
69342 }else{
69343 pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
69344 }
69345 break;
69346 }
@@ -88812,11 +88812,10 @@
88812 const char *zId; /* The function name. */
88813 FuncDef *pDef; /* Information about the function */
88814 u8 enc = ENC(pParse->db); /* The database encoding */
88815
88816 assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
88817 // notValid(pParse, pNC, "functions", NC_PartIdx);
88818 zId = pExpr->u.zToken;
88819 nId = sqlite3Strlen30(zId);
88820 pDef = sqlite3FindFunction(pParse->db, zId, n, enc, 0);
88821 if( pDef==0 ){
88822 pDef = sqlite3FindFunction(pParse->db, zId, -2, enc, 0);
@@ -124663,11 +124662,10 @@
124663 **
124664 ** * the comparison will be performed with no affinity, or
124665 ** * the affinity change in zAff is guaranteed not to change the value.
124666 */
124667 static void updateRangeAffinityStr(
124668 Parse *pParse, /* Parse context */
124669 Expr *pRight, /* RHS of comparison */
124670 int n, /* Number of vector elements in comparison */
124671 char *zAff /* Affinity string to modify */
124672 ){
124673 int i;
@@ -125749,15 +125747,15 @@
125749 assert( (bRev & ~1)==0 );
125750 pLevel->iLikeRepCntr <<=1;
125751 pLevel->iLikeRepCntr |= bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC);
125752 }
125753 #endif
125754 if( pRangeStart==0
125755 && (j = pIdx->aiColumn[nEq])>=0
125756 && pIdx->pTable->aCol[j].notNull==0
125757 ){
125758 bSeekPastNull = 1;
125759 }
125760 }
125761 assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
125762
125763 /* If we are doing a reverse order scan on an ascending index, or
@@ -125803,11 +125801,11 @@
125803 ){
125804 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
125805 VdbeCoverage(v);
125806 }
125807 if( zStartAff ){
125808 updateRangeAffinityStr(pParse, pRight, nBtm, &zStartAff[nEq]);
125809 }
125810 nConstraint += nBtm;
125811 testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
125812 if( sqlite3ExprIsVector(pRight)==0 ){
125813 disableTerm(pLevel, pRangeStart);
@@ -125853,11 +125851,11 @@
125853 ){
125854 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
125855 VdbeCoverage(v);
125856 }
125857 if( zEndAff ){
125858 updateRangeAffinityStr(pParse, pRight, nTop, zEndAff);
125859 codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);
125860 }else{
125861 assert( pParse->db->mallocFailed );
125862 }
125863 nConstraint += nTop;
@@ -130005,11 +130003,11 @@
130005 ** CREATE INDEX ... ON (a, b, c, d, e)
130006 **
130007 ** then this function would be invoked with nEq=1. The value returned in
130008 ** this case is 3.
130009 */
130010 int whereRangeVectorLen(
130011 Parse *pParse, /* Parsing context */
130012 int iCur, /* Cursor open on pIdx */
130013 Index *pIdx, /* The index to be used for a inequality constraint */
130014 int nEq, /* Number of prior equality constraints on same index */
130015 WhereTerm *pTerm /* The vector inequality constraint */
@@ -131451,11 +131449,11 @@
131451 if( rev ) *pRevMask |= MASKBIT(iLoop);
131452 revSet = 1;
131453 }
131454 }
131455 if( isMatch ){
131456 if( iColumn<0 ){
131457 testcase( distinctColumns==0 );
131458 distinctColumns = 1;
131459 }
131460 obSat |= MASKBIT(i);
131461 }else{
@@ -131905,15 +131903,20 @@
131905 }
131906 }else{
131907 pWInfo->nOBSat = pFrom->isOrdered;
131908 pWInfo->revMask = pFrom->revLoop;
131909 if( pWInfo->nOBSat<=0 ){
 
131910 pWInfo->nOBSat = 0;
131911 if( nLoop>0 && (pFrom->aLoop[nLoop-1]->wsFlags & WHERE_ONEROW)==0 ){
 
 
131912 Bitmask m = 0;
131913 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom,
131914 WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m);
 
 
131915 if( rc==pWInfo->pOrderBy->nExpr ){
131916 pWInfo->bOrderedInnerLoop = 1;
131917 pWInfo->revMask = m;
131918 }
131919 }
@@ -164296,14 +164299,16 @@
164296 char *zSql;
164297 sqlite3_stmt *p;
164298 int rc;
164299 i64 nRow = 0;
164300
164301 if( sqlite3_table_column_metadata(db,pRtree->zDb,"sqlite_stat1",
164302 0,0,0,0,0,0)==SQLITE_ERROR ){
 
 
164303 pRtree->nRowEst = RTREE_DEFAULT_ROWEST;
164304 return SQLITE_OK;
164305 }
164306 zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName);
164307 if( zSql==0 ){
164308 rc = SQLITE_NOMEM;
164309 }else{
@@ -181496,10 +181501,13 @@
181496 int nToken, /* Size of token in bytes */
181497 int iStartOff, /* Start offset of token */
181498 int iEndOff /* End offset of token */
181499 ){
181500 int rc = SQLITE_OK;
 
 
 
181501
181502 if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){
181503 Fts5SFinder *p = (Fts5SFinder*)pContext;
181504 if( p->iPos>0 ){
181505 int i;
@@ -181652,11 +181660,10 @@
181652 for(jj=0; jj<(sFinder.nFirst-1); jj++){
181653 if( sFinder.aFirst[jj+1]>io ) break;
181654 }
181655
181656 if( sFinder.aFirst[jj]<io ){
181657 int nScore;
181658 memset(aSeen, 0, nPhrase);
181659 rc = fts5SnippetScore(pApi, pFts, nDocsize, aSeen, i,
181660 sFinder.aFirst[jj], nToken, &nScore, 0
181661 );
181662
@@ -195587,11 +195594,11 @@
195587 int nArg, /* Number of args */
195588 sqlite3_value **apUnused /* Function arguments */
195589 ){
195590 assert( nArg==0 );
195591 UNUSED_PARAM2(nArg, apUnused);
195592 sqlite3_result_text(pCtx, "fts5: 2016-10-04 00:47:26 b10d0f939c82c4de3faa90b86de9ec4a89992856", -1, SQLITE_TRANSIENT);
195593 }
195594
195595 static int fts5Init(sqlite3 *db){
195596 static const sqlite3_module fts5Mod = {
195597 /* iVersion */ 2,
195598
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -381,11 +381,11 @@
381 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
382 ** [sqlite_version()] and [sqlite_source_id()].
383 */
384 #define SQLITE_VERSION "3.15.0"
385 #define SQLITE_VERSION_NUMBER 3015000
386 #define SQLITE_SOURCE_ID "2016-10-12 15:15:30 61f0526978af667781c57bcc87510e4524efd0d8"
387
388 /*
389 ** CAPI3REF: Run-Time Library Version Numbers
390 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
391 **
@@ -69336,11 +69336,11 @@
69336 switch( aff ){
69337 case SQLITE_AFF_BLOB: { /* Really a cast to BLOB */
69338 if( (pMem->flags & MEM_Blob)==0 ){
69339 sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
69340 assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
69341 if( pMem->flags & MEM_Str ) MemSetTypeFlag(pMem, MEM_Blob);
69342 }else{
69343 pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
69344 }
69345 break;
69346 }
@@ -88812,11 +88812,10 @@
88812 const char *zId; /* The function name. */
88813 FuncDef *pDef; /* Information about the function */
88814 u8 enc = ENC(pParse->db); /* The database encoding */
88815
88816 assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
 
88817 zId = pExpr->u.zToken;
88818 nId = sqlite3Strlen30(zId);
88819 pDef = sqlite3FindFunction(pParse->db, zId, n, enc, 0);
88820 if( pDef==0 ){
88821 pDef = sqlite3FindFunction(pParse->db, zId, -2, enc, 0);
@@ -124663,11 +124662,10 @@
124662 **
124663 ** * the comparison will be performed with no affinity, or
124664 ** * the affinity change in zAff is guaranteed not to change the value.
124665 */
124666 static void updateRangeAffinityStr(
 
124667 Expr *pRight, /* RHS of comparison */
124668 int n, /* Number of vector elements in comparison */
124669 char *zAff /* Affinity string to modify */
124670 ){
124671 int i;
@@ -125749,15 +125747,15 @@
125747 assert( (bRev & ~1)==0 );
125748 pLevel->iLikeRepCntr <<=1;
125749 pLevel->iLikeRepCntr |= bRev ^ (pIdx->aSortOrder[nEq]==SQLITE_SO_DESC);
125750 }
125751 #endif
125752 if( pRangeStart==0 ){
125753 j = pIdx->aiColumn[nEq];
125754 if( (j>=0 && pIdx->pTable->aCol[j].notNull==0) || j==XN_EXPR ){
125755 bSeekPastNull = 1;
125756 }
125757 }
125758 }
125759 assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
125760
125761 /* If we are doing a reverse order scan on an ascending index, or
@@ -125803,11 +125801,11 @@
125801 ){
125802 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
125803 VdbeCoverage(v);
125804 }
125805 if( zStartAff ){
125806 updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
125807 }
125808 nConstraint += nBtm;
125809 testcase( pRangeStart->wtFlags & TERM_VIRTUAL );
125810 if( sqlite3ExprIsVector(pRight)==0 ){
125811 disableTerm(pLevel, pRangeStart);
@@ -125853,11 +125851,11 @@
125851 ){
125852 sqlite3VdbeAddOp2(v, OP_IsNull, regBase+nEq, addrNxt);
125853 VdbeCoverage(v);
125854 }
125855 if( zEndAff ){
125856 updateRangeAffinityStr(pRight, nTop, zEndAff);
125857 codeApplyAffinity(pParse, regBase+nEq, nTop, zEndAff);
125858 }else{
125859 assert( pParse->db->mallocFailed );
125860 }
125861 nConstraint += nTop;
@@ -130005,11 +130003,11 @@
130003 ** CREATE INDEX ... ON (a, b, c, d, e)
130004 **
130005 ** then this function would be invoked with nEq=1. The value returned in
130006 ** this case is 3.
130007 */
130008 static int whereRangeVectorLen(
130009 Parse *pParse, /* Parsing context */
130010 int iCur, /* Cursor open on pIdx */
130011 Index *pIdx, /* The index to be used for a inequality constraint */
130012 int nEq, /* Number of prior equality constraints on same index */
130013 WhereTerm *pTerm /* The vector inequality constraint */
@@ -131451,11 +131449,11 @@
131449 if( rev ) *pRevMask |= MASKBIT(iLoop);
131450 revSet = 1;
131451 }
131452 }
131453 if( isMatch ){
131454 if( iColumn==XN_ROWID ){
131455 testcase( distinctColumns==0 );
131456 distinctColumns = 1;
131457 }
131458 obSat |= MASKBIT(i);
131459 }else{
@@ -131905,15 +131903,20 @@
131903 }
131904 }else{
131905 pWInfo->nOBSat = pFrom->isOrdered;
131906 pWInfo->revMask = pFrom->revLoop;
131907 if( pWInfo->nOBSat<=0 ){
131908 u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;
131909 pWInfo->nOBSat = 0;
131910 if( nLoop>0 && (wsFlags & WHERE_ONEROW)==0
131911 && (wsFlags & (WHERE_IPK|WHERE_COLUMN_IN))!=(WHERE_IPK|WHERE_COLUMN_IN)
131912 ){
131913 Bitmask m = 0;
131914 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom,
131915 WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m);
131916 testcase( wsFlags & WHERE_IPK );
131917 testcase( wsFlags & WHERE_COLUMN_IN );
131918 if( rc==pWInfo->pOrderBy->nExpr ){
131919 pWInfo->bOrderedInnerLoop = 1;
131920 pWInfo->revMask = m;
131921 }
131922 }
@@ -164296,14 +164299,16 @@
164299 char *zSql;
164300 sqlite3_stmt *p;
164301 int rc;
164302 i64 nRow = 0;
164303
164304 rc = sqlite3_table_column_metadata(
164305 db, pRtree->zDb, "sqlite_stat1",0,0,0,0,0,0
164306 );
164307 if( rc!=SQLITE_OK ){
164308 pRtree->nRowEst = RTREE_DEFAULT_ROWEST;
164309 return rc==SQLITE_ERROR ? SQLITE_OK : rc;
164310 }
164311 zSql = sqlite3_mprintf(zFmt, pRtree->zDb, pRtree->zName);
164312 if( zSql==0 ){
164313 rc = SQLITE_NOMEM;
164314 }else{
@@ -181496,10 +181501,13 @@
181501 int nToken, /* Size of token in bytes */
181502 int iStartOff, /* Start offset of token */
181503 int iEndOff /* End offset of token */
181504 ){
181505 int rc = SQLITE_OK;
181506
181507 UNUSED_PARAM2(pToken, nToken);
181508 UNUSED_PARAM(iEndOff);
181509
181510 if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){
181511 Fts5SFinder *p = (Fts5SFinder*)pContext;
181512 if( p->iPos>0 ){
181513 int i;
@@ -181652,11 +181660,10 @@
181660 for(jj=0; jj<(sFinder.nFirst-1); jj++){
181661 if( sFinder.aFirst[jj+1]>io ) break;
181662 }
181663
181664 if( sFinder.aFirst[jj]<io ){
 
181665 memset(aSeen, 0, nPhrase);
181666 rc = fts5SnippetScore(pApi, pFts, nDocsize, aSeen, i,
181667 sFinder.aFirst[jj], nToken, &nScore, 0
181668 );
181669
@@ -195587,11 +195594,11 @@
195594 int nArg, /* Number of args */
195595 sqlite3_value **apUnused /* Function arguments */
195596 ){
195597 assert( nArg==0 );
195598 UNUSED_PARAM2(nArg, apUnused);
195599 sqlite3_result_text(pCtx, "fts5: 2016-10-10 14:48:36 6624c4964b63e259d5ee006eaa7ec79ddadbd6a6", -1, SQLITE_TRANSIENT);
195600 }
195601
195602 static int fts5Init(sqlite3 *db){
195603 static const sqlite3_module fts5Mod = {
195604 /* iVersion */ 2,
195605
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -121,11 +121,11 @@
121121
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122122
** [sqlite_version()] and [sqlite_source_id()].
123123
*/
124124
#define SQLITE_VERSION "3.15.0"
125125
#define SQLITE_VERSION_NUMBER 3015000
126
-#define SQLITE_SOURCE_ID "2016-10-04 12:20:12 3a9d802fda10585654332b314d317250dc5d894e"
126
+#define SQLITE_SOURCE_ID "2016-10-12 15:15:30 61f0526978af667781c57bcc87510e4524efd0d8"
127127
128128
/*
129129
** CAPI3REF: Run-Time Library Version Numbers
130130
** KEYWORDS: sqlite3_version, sqlite3_sourceid
131131
**
132132
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -121,11 +121,11 @@
121 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122 ** [sqlite_version()] and [sqlite_source_id()].
123 */
124 #define SQLITE_VERSION "3.15.0"
125 #define SQLITE_VERSION_NUMBER 3015000
126 #define SQLITE_SOURCE_ID "2016-10-04 12:20:12 3a9d802fda10585654332b314d317250dc5d894e"
127
128 /*
129 ** CAPI3REF: Run-Time Library Version Numbers
130 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
131 **
132
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -121,11 +121,11 @@
121 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
122 ** [sqlite_version()] and [sqlite_source_id()].
123 */
124 #define SQLITE_VERSION "3.15.0"
125 #define SQLITE_VERSION_NUMBER 3015000
126 #define SQLITE_SOURCE_ID "2016-10-12 15:15:30 61f0526978af667781c57bcc87510e4524efd0d8"
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