Fossil SCM

Update the SQLite 3.9.0 beta with fixing for warnings on various obscure compilers. Omit the use of strcpy() in FTS5 since OpenBSD hates strcpy().

drh 2015-10-10 15:13 trunk
Commit d4a34293aeb890b678ae2a7bc96fe3ed61a00dc2
2 files changed +57 -54 +1 -1
+57 -54
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -325,11 +325,11 @@
325325
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326326
** [sqlite_version()] and [sqlite_source_id()].
327327
*/
328328
#define SQLITE_VERSION "3.9.0"
329329
#define SQLITE_VERSION_NUMBER 3009000
330
-#define SQLITE_SOURCE_ID "2015-10-10 14:00:37 de28acd42f29693341feb884b7223cd3d2b96730"
330
+#define SQLITE_SOURCE_ID "2015-10-10 15:11:49 bc24a5bbfd95df3518611b221de69b73776111bc"
331331
332332
/*
333333
** CAPI3REF: Run-Time Library Version Numbers
334334
** KEYWORDS: sqlite3_version, sqlite3_sourceid
335335
**
@@ -86562,17 +86562,17 @@
8656286562
** it contains any NULL entries. Cause the register at regHasNull to be set
8656386563
** to a non-NULL value if iCur contains no NULLs. Cause register regHasNull
8656486564
** to be set to NULL if iCur contains one or more NULL values.
8656586565
*/
8656686566
static void sqlite3SetHasNullFlag(Vdbe *v, int iCur, int regHasNull){
86567
- int j1;
86567
+ int addr1;
8656886568
sqlite3VdbeAddOp2(v, OP_Integer, 0, regHasNull);
86569
- j1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
86569
+ addr1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
8657086570
sqlite3VdbeAddOp3(v, OP_Column, iCur, 0, regHasNull);
8657186571
sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
8657286572
VdbeComment((v, "first_entry_in(%d)", iCur));
86573
- sqlite3VdbeJumpHere(v, j1);
86573
+ sqlite3VdbeJumpHere(v, addr1);
8657486574
}
8657586575
8657686576
8657786577
#ifndef SQLITE_OMIT_SUBQUERY
8657886578
/*
@@ -87168,24 +87168,24 @@
8716887168
}else{
8716987169
/* In this branch, the RHS of the IN might contain a NULL and
8717087170
** the presence of a NULL on the RHS makes a difference in the
8717187171
** outcome.
8717287172
*/
87173
- int j1;
87173
+ int addr1;
8717487174
8717587175
/* First check to see if the LHS is contained in the RHS. If so,
8717687176
** then the answer is TRUE the presence of NULLs in the RHS does
8717787177
** not matter. If the LHS is not contained in the RHS, then the
8717887178
** answer is NULL if the RHS contains NULLs and the answer is
8717987179
** FALSE if the RHS is NULL-free.
8718087180
*/
87181
- j1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
87181
+ addr1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
8718287182
VdbeCoverage(v);
8718387183
sqlite3VdbeAddOp2(v, OP_IsNull, rRhsHasNull, destIfNull);
8718487184
VdbeCoverage(v);
8718587185
sqlite3VdbeGoto(v, destIfFalse);
87186
- sqlite3VdbeJumpHere(v, j1);
87186
+ sqlite3VdbeJumpHere(v, addr1);
8718787187
}
8718887188
}
8718987189
}
8719087190
sqlite3ReleaseTempReg(pParse, r1);
8719187191
sqlite3ExprCachePop(pParse);
@@ -89772,18 +89772,18 @@
8977289772
** If that allocation failed, we would have quit before reaching this
8977389773
** point */
8977489774
if( ALWAYS(v) ){
8977589775
int r1 = sqlite3GetTempReg(pParse);
8977689776
int r2 = sqlite3GetTempReg(pParse);
89777
- int j1;
89777
+ int addr1;
8977889778
sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
8977989779
sqlite3VdbeUsesBtree(v, iDb);
8978089780
sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
89781
- j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
89781
+ addr1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
8978289782
sqlite3VdbeChangeP5(v, SQLITE_NOTNULL); VdbeCoverage(v);
8978389783
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
89784
- sqlite3VdbeJumpHere(v, j1);
89784
+ sqlite3VdbeJumpHere(v, addr1);
8978589785
sqlite3ReleaseTempReg(pParse, r1);
8978689786
sqlite3ReleaseTempReg(pParse, r2);
8978789787
}
8978889788
}
8978989789
@@ -93734,11 +93734,11 @@
9373493734
** indices to be created and the table record must come before the
9373593735
** indices. Hence, the record number for the table must be allocated
9373693736
** now.
9373793737
*/
9373893738
if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
93739
- int j1;
93739
+ int addr1;
9374093740
int fileFormat;
9374193741
int reg1, reg2, reg3;
9374293742
/* nullRow[] is an OP_Record encoding of a row containing 5 NULLs */
9374393743
static const char nullRow[] = { 6, 0, 0, 0, 0, 0 };
9374493744
sqlite3BeginWriteOperation(pParse, 1, iDb);
@@ -93755,18 +93755,18 @@
9375593755
reg1 = pParse->regRowid = ++pParse->nMem;
9375693756
reg2 = pParse->regRoot = ++pParse->nMem;
9375793757
reg3 = ++pParse->nMem;
9375893758
sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
9375993759
sqlite3VdbeUsesBtree(v, iDb);
93760
- j1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
93760
+ addr1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
9376193761
fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
9376293762
1 : SQLITE_MAX_FILE_FORMAT;
9376393763
sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
9376493764
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
9376593765
sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
9376693766
sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
93767
- sqlite3VdbeJumpHere(v, j1);
93767
+ sqlite3VdbeJumpHere(v, addr1);
9376893768
9376993769
/* This just creates a place-holder record in the sqlite_master table.
9377093770
** The record created does not contain anything yet. It will be replaced
9377193771
** by the real entry in code generated at sqlite3EndTable().
9377293772
**
@@ -102081,20 +102081,20 @@
102081102081
sqlite3 *db = pParse->db;
102082102082
102083102083
assert( v );
102084102084
for(p = pParse->pAinc; p; p = p->pNext){
102085102085
Db *pDb = &db->aDb[p->iDb];
102086
- int j1;
102086
+ int addr1;
102087102087
int iRec;
102088102088
int memId = p->regCtr;
102089102089
102090102090
iRec = sqlite3GetTempReg(pParse);
102091102091
assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
102092102092
sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
102093
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
102093
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
102094102094
sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
102095
- sqlite3VdbeJumpHere(v, j1);
102095
+ sqlite3VdbeJumpHere(v, addr1);
102096102096
sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
102097102097
sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
102098102098
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
102099102099
sqlite3VdbeAddOp0(v, OP_Close);
102100102100
sqlite3ReleaseTempReg(pParse, iRec);
@@ -102582,21 +102582,21 @@
102582102582
** not happened yet) so we substitute a rowid of -1
102583102583
*/
102584102584
if( ipkColumn<0 ){
102585102585
sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
102586102586
}else{
102587
- int j1;
102587
+ int addr1;
102588102588
assert( !withoutRowid );
102589102589
if( useTempTable ){
102590102590
sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regCols);
102591102591
}else{
102592102592
assert( pSelect==0 ); /* Otherwise useTempTable is true */
102593102593
sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regCols);
102594102594
}
102595
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
102595
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
102596102596
sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
102597
- sqlite3VdbeJumpHere(v, j1);
102597
+ sqlite3VdbeJumpHere(v, addr1);
102598102598
sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols); VdbeCoverage(v);
102599102599
}
102600102600
102601102601
/* Cannot have triggers on a virtual table. If it were possible,
102602102602
** this block would have to account for hidden column.
@@ -102666,18 +102666,18 @@
102666102666
}
102667102667
/* If the PRIMARY KEY expression is NULL, then use OP_NewRowid
102668102668
** to generate a unique primary key value.
102669102669
*/
102670102670
if( !appendFlag ){
102671
- int j1;
102671
+ int addr1;
102672102672
if( !IsVirtual(pTab) ){
102673
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
102673
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
102674102674
sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);
102675
- sqlite3VdbeJumpHere(v, j1);
102675
+ sqlite3VdbeJumpHere(v, addr1);
102676102676
}else{
102677
- j1 = sqlite3VdbeCurrentAddr(v);
102678
- sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, j1+2); VdbeCoverage(v);
102677
+ addr1 = sqlite3VdbeCurrentAddr(v);
102678
+ sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, addr1+2); VdbeCoverage(v);
102679102679
}
102680102680
sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid); VdbeCoverage(v);
102681102681
}
102682102682
}else if( IsVirtual(pTab) || withoutRowid ){
102683102683
sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);
@@ -102927,11 +102927,11 @@
102927102927
sqlite3 *db; /* Database connection */
102928102928
int i; /* loop counter */
102929102929
int ix; /* Index loop counter */
102930102930
int nCol; /* Number of columns */
102931102931
int onError; /* Conflict resolution strategy */
102932
- int j1; /* Address of jump instruction */
102932
+ int addr1; /* Address of jump instruction */
102933102933
int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
102934102934
int nPkField; /* Number of fields in PRIMARY KEY. 1 for ROWID tables */
102935102935
int ipkTop = 0; /* Top of the rowid change constraint check */
102936102936
int ipkBottom = 0; /* Bottom of the rowid change constraint check */
102937102937
u8 isUpdate; /* True if this is an UPDATE operation */
@@ -102998,13 +102998,14 @@
102998102998
VdbeCoverage(v);
102999102999
break;
103000103000
}
103001103001
default: {
103002103002
assert( onError==OE_Replace );
103003
- j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i); VdbeCoverage(v);
103003
+ addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i);
103004
+ VdbeCoverage(v);
103004103005
sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i);
103005
- sqlite3VdbeJumpHere(v, j1);
103006
+ sqlite3VdbeJumpHere(v, addr1);
103006103007
break;
103007103008
}
103008103009
}
103009103010
}
103010103011
@@ -105163,11 +105164,11 @@
105163105164
** loading is supported. We need a dummy sqlite3Apis pointer for that
105164105165
** code if regular extension loading is not available. This is that
105165105166
** dummy pointer.
105166105167
*/
105167105168
#ifdef SQLITE_OMIT_LOAD_EXTENSION
105168
-static const sqlite3_api_routines sqlite3Apis = { 0 };
105169
+static const sqlite3_api_routines sqlite3Apis;
105169105170
#endif
105170105171
105171105172
105172105173
/*
105173105174
** The following object holds the list of automatically loaded
@@ -111198,16 +111199,16 @@
111198111199
iContinue = sqlite3VdbeMakeLabel(v);
111199111200
111200111201
/* Suppress duplicates for UNION, EXCEPT, and INTERSECT
111201111202
*/
111202111203
if( regPrev ){
111203
- int j1, j2;
111204
- j1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
111205
- j2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
111204
+ int addr1, addr2;
111205
+ addr1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
111206
+ addr2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
111206111207
(char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
111207
- sqlite3VdbeAddOp3(v, OP_Jump, j2+2, iContinue, j2+2); VdbeCoverage(v);
111208
- sqlite3VdbeJumpHere(v, j1);
111208
+ sqlite3VdbeAddOp3(v, OP_Jump, addr2+2, iContinue, addr2+2); VdbeCoverage(v);
111209
+ sqlite3VdbeJumpHere(v, addr1);
111209111210
sqlite3VdbeAddOp3(v, OP_Copy, pIn->iSdst, regPrev+1, pIn->nSdst-1);
111210111211
sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
111211111212
}
111212111213
if( pParse->db->mallocFailed ) return 0;
111213111214
@@ -111420,11 +111421,11 @@
111420111421
int regPrev; /* A range of registers to hold previous output */
111421111422
int savedLimit; /* Saved value of p->iLimit */
111422111423
int savedOffset; /* Saved value of p->iOffset */
111423111424
int labelCmpr; /* Label for the start of the merge algorithm */
111424111425
int labelEnd; /* Label for the end of the overall SELECT stmt */
111425
- int j1; /* Jump instructions that get retargetted */
111426
+ int addr1; /* Jump instructions that get retargetted */
111426111427
int op; /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
111427111428
KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
111428111429
KeyInfo *pKeyMerge; /* Comparison information for merging rows */
111429111430
sqlite3 *db; /* Database connection */
111430111431
ExprList *pOrderBy; /* The ORDER BY clause */
@@ -111556,23 +111557,23 @@
111556111557
111557111558
/* Generate a coroutine to evaluate the SELECT statement to the
111558111559
** left of the compound operator - the "A" select.
111559111560
*/
111560111561
addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;
111561
- j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
111562
+ addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
111562111563
VdbeComment((v, "left SELECT"));
111563111564
pPrior->iLimit = regLimitA;
111564111565
explainSetInteger(iSub1, pParse->iNextSelectId);
111565111566
sqlite3Select(pParse, pPrior, &destA);
111566111567
sqlite3VdbeAddOp1(v, OP_EndCoroutine, regAddrA);
111567
- sqlite3VdbeJumpHere(v, j1);
111568
+ sqlite3VdbeJumpHere(v, addr1);
111568111569
111569111570
/* Generate a coroutine to evaluate the SELECT statement on
111570111571
** the right - the "B" select
111571111572
*/
111572111573
addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;
111573
- j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
111574
+ addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
111574111575
VdbeComment((v, "right SELECT"));
111575111576
savedLimit = p->iLimit;
111576111577
savedOffset = p->iOffset;
111577111578
p->iLimit = regLimitB;
111578111579
p->iOffset = 0;
@@ -111659,11 +111660,11 @@
111659111660
sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
111660111661
sqlite3VdbeGoto(v, labelCmpr);
111661111662
111662111663
/* This code runs once to initialize everything.
111663111664
*/
111664
- sqlite3VdbeJumpHere(v, j1);
111665
+ sqlite3VdbeJumpHere(v, addr1);
111665111666
sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);
111666111667
sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
111667111668
111668111669
/* Implement the main merge loop
111669111670
*/
@@ -113833,11 +113834,11 @@
113833113834
/* Processing for aggregates with GROUP BY is very different and
113834113835
** much more complex than aggregates without a GROUP BY.
113835113836
*/
113836113837
if( pGroupBy ){
113837113838
KeyInfo *pKeyInfo; /* Keying information for the group by clause */
113838
- int j1; /* A-vs-B comparision jump */
113839
+ int addr1; /* A-vs-B comparision jump */
113839113840
int addrOutputRow; /* Start of subroutine that outputs a result row */
113840113841
int regOutputRow; /* Return address register for output subroutine */
113841113842
int addrSetAbort; /* Set the abort flag and return */
113842113843
int addrTopOfLoop; /* Top of the input loop */
113843113844
int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */
@@ -113981,12 +113982,12 @@
113981113982
sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
113982113983
}
113983113984
}
113984113985
sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
113985113986
(char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
113986
- j1 = sqlite3VdbeCurrentAddr(v);
113987
- sqlite3VdbeAddOp3(v, OP_Jump, j1+1, 0, j1+1); VdbeCoverage(v);
113987
+ addr1 = sqlite3VdbeCurrentAddr(v);
113988
+ sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v);
113988113989
113989113990
/* Generate code that runs whenever the GROUP BY changes.
113990113991
** Changes in the GROUP BY are detected by the previous code
113991113992
** block. If there were no changes, this block is skipped.
113992113993
**
@@ -114004,11 +114005,11 @@
114004114005
VdbeComment((v, "reset accumulator"));
114005114006
114006114007
/* Update the aggregate accumulators based on the content of
114007114008
** the current row
114008114009
*/
114009
- sqlite3VdbeJumpHere(v, j1);
114010
+ sqlite3VdbeJumpHere(v, addr1);
114010114011
updateAccumulator(pParse, &sAggInfo);
114011114012
sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
114012114013
VdbeComment((v, "indicate data in accumulator"));
114013114014
114014114015
/* End of the loop
@@ -116133,11 +116134,11 @@
116133116134
}
116134116135
}
116135116136
}
116136116137
116137116138
if( !isView ){
116138
- int j1 = 0; /* Address of jump instruction */
116139
+ int addr1 = 0; /* Address of jump instruction */
116139116140
int bReplace = 0; /* True if REPLACE conflict resolution might happen */
116140116141
116141116142
/* Do constraint checks. */
116142116143
assert( regOldRowid>0 );
116143116144
sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur,
@@ -116149,13 +116150,13 @@
116149116150
}
116150116151
116151116152
/* Delete the index entries associated with the current record. */
116152116153
if( bReplace || chngKey ){
116153116154
if( pPk ){
116154
- j1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
116155
+ addr1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
116155116156
}else{
116156
- j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
116157
+ addr1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
116157116158
}
116158116159
VdbeCoverageNeverTaken(v);
116159116160
}
116160116161
sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx, -1);
116161116162
@@ -116162,11 +116163,11 @@
116162116163
/* If changing the record number, delete the old record. */
116163116164
if( hasFK || chngKey || pPk!=0 ){
116164116165
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);
116165116166
}
116166116167
if( bReplace || chngKey ){
116167
- sqlite3VdbeJumpHere(v, j1);
116168
+ sqlite3VdbeJumpHere(v, addr1);
116168116169
}
116169116170
116170116171
if( hasFK ){
116171116172
sqlite3FkCheck(pParse, pTab, 0, regNewRowid, aXRef, chngKey);
116172116173
}
@@ -119772,11 +119773,11 @@
119772119773
for(ii=0; ii<pOrWc->nTerm; ii++){
119773119774
WhereTerm *pOrTerm = &pOrWc->a[ii];
119774119775
if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
119775119776
WhereInfo *pSubWInfo; /* Info for single OR-term scan */
119776119777
Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */
119777
- int j1 = 0; /* Address of jump operation */
119778
+ int jmp1 = 0; /* Address of jump operation */
119778119779
if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
119779119780
pAndExpr->pLeft = pOrExpr;
119780119781
pOrExpr = pAndExpr;
119781119782
}
119782119783
/* Loop through table entries that match term pOrTerm. */
@@ -119799,11 +119800,12 @@
119799119800
if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
119800119801
int r;
119801119802
int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
119802119803
if( HasRowid(pTab) ){
119803119804
r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
119804
- j1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0, r,iSet);
119805
+ jmp1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0,
119806
+ r,iSet);
119805119807
VdbeCoverage(v);
119806119808
}else{
119807119809
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
119808119810
int nPk = pPk->nKeyCol;
119809119811
int iPk;
@@ -119829,11 +119831,11 @@
119829119831
** is zero, assume that the key cannot already be present in
119830119832
** the temp table. And if iSet is -1, assume that there is no
119831119833
** need to insert the key into the temp table, as it will never
119832119834
** be tested for. */
119833119835
if( iSet ){
119834
- j1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
119836
+ jmp1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
119835119837
VdbeCoverage(v);
119836119838
}
119837119839
if( iSet>=0 ){
119838119840
sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);
119839119841
sqlite3VdbeAddOp3(v, OP_IdxInsert, regRowset, regRowid, 0);
@@ -119848,11 +119850,11 @@
119848119850
/* Invoke the main loop body as a subroutine */
119849119851
sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
119850119852
119851119853
/* Jump here (skipping the main loop body subroutine) if the
119852119854
** current sub-WHERE row is a duplicate from prior sub-WHEREs. */
119853
- if( j1 ) sqlite3VdbeJumpHere(v, j1);
119855
+ if( jmp1 ) sqlite3VdbeJumpHere(v, jmp1);
119854119856
119855119857
/* The pSubWInfo->untestedTerms flag means that this OR term
119856119858
** contained one or more AND term from a notReady table. The
119857119859
** terms from the notReady table could not be tested and will
119858119860
** need to be tested later.
@@ -180360,18 +180362,20 @@
180360180362
){
180361180363
Fts5Global *pGlobal = (Fts5Global*)pApi;
180362180364
int rc = sqlite3_overload_function(pGlobal->db, zName, -1);
180363180365
if( rc==SQLITE_OK ){
180364180366
Fts5Auxiliary *pAux;
180367
+ int nName; /* Size of zName in bytes, including \0 */
180365180368
int nByte; /* Bytes of space to allocate */
180366180369
180367
- nByte = sizeof(Fts5Auxiliary) + strlen(zName) + 1;
180370
+ nName = (int)strlen(zName) + 1;
180371
+ nByte = sizeof(Fts5Auxiliary) + nName;
180368180372
pAux = (Fts5Auxiliary*)sqlite3_malloc(nByte);
180369180373
if( pAux ){
180370180374
memset(pAux, 0, nByte);
180371180375
pAux->zFunc = (char*)&pAux[1];
180372
- strcpy(pAux->zFunc, zName);
180376
+ memcpy(pAux->zFunc, zName, nName);
180373180377
pAux->pGlobal = pGlobal;
180374180378
pAux->pUserData = pUserData;
180375180379
pAux->xFunc = xFunc;
180376180380
pAux->xDestroy = xDestroy;
180377180381
pAux->pNext = pGlobal->pAux;
@@ -180535,11 +180539,11 @@
180535180539
sqlite3_context *pCtx, /* Function call context */
180536180540
int nArg, /* Number of args */
180537180541
sqlite3_value **apVal /* Function arguments */
180538180542
){
180539180543
assert( nArg==0 );
180540
- sqlite3_result_text(pCtx, "fts5: 2015-10-09 13:42:52 aa8fdadf2defed00a28366a3b35a3e2eefecf0ed", -1, SQLITE_TRANSIENT);
180544
+ sqlite3_result_text(pCtx, "fts5: 2015-10-10 15:11:49 bc24a5bbfd95df3518611b221de69b73776111bc", -1, SQLITE_TRANSIENT);
180541180545
}
180542180546
180543180547
static int fts5Init(sqlite3 *db){
180544180548
static const sqlite3_module fts5Mod = {
180545180549
/* iVersion */ 2,
@@ -180639,11 +180643,10 @@
180639180643
#else
180640180644
SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
180641180645
return fts5Init(db);
180642180646
}
180643180647
#endif
180644
-
180645180648
180646180649
/*
180647180650
** 2014 May 31
180648180651
**
180649180652
** The author disclaims copyright to this source code. In place of
180650180653
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -325,11 +325,11 @@
325 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326 ** [sqlite_version()] and [sqlite_source_id()].
327 */
328 #define SQLITE_VERSION "3.9.0"
329 #define SQLITE_VERSION_NUMBER 3009000
330 #define SQLITE_SOURCE_ID "2015-10-10 14:00:37 de28acd42f29693341feb884b7223cd3d2b96730"
331
332 /*
333 ** CAPI3REF: Run-Time Library Version Numbers
334 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
335 **
@@ -86562,17 +86562,17 @@
86562 ** it contains any NULL entries. Cause the register at regHasNull to be set
86563 ** to a non-NULL value if iCur contains no NULLs. Cause register regHasNull
86564 ** to be set to NULL if iCur contains one or more NULL values.
86565 */
86566 static void sqlite3SetHasNullFlag(Vdbe *v, int iCur, int regHasNull){
86567 int j1;
86568 sqlite3VdbeAddOp2(v, OP_Integer, 0, regHasNull);
86569 j1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
86570 sqlite3VdbeAddOp3(v, OP_Column, iCur, 0, regHasNull);
86571 sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
86572 VdbeComment((v, "first_entry_in(%d)", iCur));
86573 sqlite3VdbeJumpHere(v, j1);
86574 }
86575
86576
86577 #ifndef SQLITE_OMIT_SUBQUERY
86578 /*
@@ -87168,24 +87168,24 @@
87168 }else{
87169 /* In this branch, the RHS of the IN might contain a NULL and
87170 ** the presence of a NULL on the RHS makes a difference in the
87171 ** outcome.
87172 */
87173 int j1;
87174
87175 /* First check to see if the LHS is contained in the RHS. If so,
87176 ** then the answer is TRUE the presence of NULLs in the RHS does
87177 ** not matter. If the LHS is not contained in the RHS, then the
87178 ** answer is NULL if the RHS contains NULLs and the answer is
87179 ** FALSE if the RHS is NULL-free.
87180 */
87181 j1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
87182 VdbeCoverage(v);
87183 sqlite3VdbeAddOp2(v, OP_IsNull, rRhsHasNull, destIfNull);
87184 VdbeCoverage(v);
87185 sqlite3VdbeGoto(v, destIfFalse);
87186 sqlite3VdbeJumpHere(v, j1);
87187 }
87188 }
87189 }
87190 sqlite3ReleaseTempReg(pParse, r1);
87191 sqlite3ExprCachePop(pParse);
@@ -89772,18 +89772,18 @@
89772 ** If that allocation failed, we would have quit before reaching this
89773 ** point */
89774 if( ALWAYS(v) ){
89775 int r1 = sqlite3GetTempReg(pParse);
89776 int r2 = sqlite3GetTempReg(pParse);
89777 int j1;
89778 sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
89779 sqlite3VdbeUsesBtree(v, iDb);
89780 sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
89781 j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
89782 sqlite3VdbeChangeP5(v, SQLITE_NOTNULL); VdbeCoverage(v);
89783 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
89784 sqlite3VdbeJumpHere(v, j1);
89785 sqlite3ReleaseTempReg(pParse, r1);
89786 sqlite3ReleaseTempReg(pParse, r2);
89787 }
89788 }
89789
@@ -93734,11 +93734,11 @@
93734 ** indices to be created and the table record must come before the
93735 ** indices. Hence, the record number for the table must be allocated
93736 ** now.
93737 */
93738 if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
93739 int j1;
93740 int fileFormat;
93741 int reg1, reg2, reg3;
93742 /* nullRow[] is an OP_Record encoding of a row containing 5 NULLs */
93743 static const char nullRow[] = { 6, 0, 0, 0, 0, 0 };
93744 sqlite3BeginWriteOperation(pParse, 1, iDb);
@@ -93755,18 +93755,18 @@
93755 reg1 = pParse->regRowid = ++pParse->nMem;
93756 reg2 = pParse->regRoot = ++pParse->nMem;
93757 reg3 = ++pParse->nMem;
93758 sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
93759 sqlite3VdbeUsesBtree(v, iDb);
93760 j1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
93761 fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
93762 1 : SQLITE_MAX_FILE_FORMAT;
93763 sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
93764 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
93765 sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
93766 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
93767 sqlite3VdbeJumpHere(v, j1);
93768
93769 /* This just creates a place-holder record in the sqlite_master table.
93770 ** The record created does not contain anything yet. It will be replaced
93771 ** by the real entry in code generated at sqlite3EndTable().
93772 **
@@ -102081,20 +102081,20 @@
102081 sqlite3 *db = pParse->db;
102082
102083 assert( v );
102084 for(p = pParse->pAinc; p; p = p->pNext){
102085 Db *pDb = &db->aDb[p->iDb];
102086 int j1;
102087 int iRec;
102088 int memId = p->regCtr;
102089
102090 iRec = sqlite3GetTempReg(pParse);
102091 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
102092 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
102093 j1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
102094 sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
102095 sqlite3VdbeJumpHere(v, j1);
102096 sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
102097 sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
102098 sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
102099 sqlite3VdbeAddOp0(v, OP_Close);
102100 sqlite3ReleaseTempReg(pParse, iRec);
@@ -102582,21 +102582,21 @@
102582 ** not happened yet) so we substitute a rowid of -1
102583 */
102584 if( ipkColumn<0 ){
102585 sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
102586 }else{
102587 int j1;
102588 assert( !withoutRowid );
102589 if( useTempTable ){
102590 sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regCols);
102591 }else{
102592 assert( pSelect==0 ); /* Otherwise useTempTable is true */
102593 sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regCols);
102594 }
102595 j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
102596 sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
102597 sqlite3VdbeJumpHere(v, j1);
102598 sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols); VdbeCoverage(v);
102599 }
102600
102601 /* Cannot have triggers on a virtual table. If it were possible,
102602 ** this block would have to account for hidden column.
@@ -102666,18 +102666,18 @@
102666 }
102667 /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid
102668 ** to generate a unique primary key value.
102669 */
102670 if( !appendFlag ){
102671 int j1;
102672 if( !IsVirtual(pTab) ){
102673 j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
102674 sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);
102675 sqlite3VdbeJumpHere(v, j1);
102676 }else{
102677 j1 = sqlite3VdbeCurrentAddr(v);
102678 sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, j1+2); VdbeCoverage(v);
102679 }
102680 sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid); VdbeCoverage(v);
102681 }
102682 }else if( IsVirtual(pTab) || withoutRowid ){
102683 sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);
@@ -102927,11 +102927,11 @@
102927 sqlite3 *db; /* Database connection */
102928 int i; /* loop counter */
102929 int ix; /* Index loop counter */
102930 int nCol; /* Number of columns */
102931 int onError; /* Conflict resolution strategy */
102932 int j1; /* Address of jump instruction */
102933 int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
102934 int nPkField; /* Number of fields in PRIMARY KEY. 1 for ROWID tables */
102935 int ipkTop = 0; /* Top of the rowid change constraint check */
102936 int ipkBottom = 0; /* Bottom of the rowid change constraint check */
102937 u8 isUpdate; /* True if this is an UPDATE operation */
@@ -102998,13 +102998,14 @@
102998 VdbeCoverage(v);
102999 break;
103000 }
103001 default: {
103002 assert( onError==OE_Replace );
103003 j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i); VdbeCoverage(v);
 
103004 sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i);
103005 sqlite3VdbeJumpHere(v, j1);
103006 break;
103007 }
103008 }
103009 }
103010
@@ -105163,11 +105164,11 @@
105163 ** loading is supported. We need a dummy sqlite3Apis pointer for that
105164 ** code if regular extension loading is not available. This is that
105165 ** dummy pointer.
105166 */
105167 #ifdef SQLITE_OMIT_LOAD_EXTENSION
105168 static const sqlite3_api_routines sqlite3Apis = { 0 };
105169 #endif
105170
105171
105172 /*
105173 ** The following object holds the list of automatically loaded
@@ -111198,16 +111199,16 @@
111198 iContinue = sqlite3VdbeMakeLabel(v);
111199
111200 /* Suppress duplicates for UNION, EXCEPT, and INTERSECT
111201 */
111202 if( regPrev ){
111203 int j1, j2;
111204 j1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
111205 j2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
111206 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
111207 sqlite3VdbeAddOp3(v, OP_Jump, j2+2, iContinue, j2+2); VdbeCoverage(v);
111208 sqlite3VdbeJumpHere(v, j1);
111209 sqlite3VdbeAddOp3(v, OP_Copy, pIn->iSdst, regPrev+1, pIn->nSdst-1);
111210 sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
111211 }
111212 if( pParse->db->mallocFailed ) return 0;
111213
@@ -111420,11 +111421,11 @@
111420 int regPrev; /* A range of registers to hold previous output */
111421 int savedLimit; /* Saved value of p->iLimit */
111422 int savedOffset; /* Saved value of p->iOffset */
111423 int labelCmpr; /* Label for the start of the merge algorithm */
111424 int labelEnd; /* Label for the end of the overall SELECT stmt */
111425 int j1; /* Jump instructions that get retargetted */
111426 int op; /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
111427 KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
111428 KeyInfo *pKeyMerge; /* Comparison information for merging rows */
111429 sqlite3 *db; /* Database connection */
111430 ExprList *pOrderBy; /* The ORDER BY clause */
@@ -111556,23 +111557,23 @@
111556
111557 /* Generate a coroutine to evaluate the SELECT statement to the
111558 ** left of the compound operator - the "A" select.
111559 */
111560 addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;
111561 j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
111562 VdbeComment((v, "left SELECT"));
111563 pPrior->iLimit = regLimitA;
111564 explainSetInteger(iSub1, pParse->iNextSelectId);
111565 sqlite3Select(pParse, pPrior, &destA);
111566 sqlite3VdbeAddOp1(v, OP_EndCoroutine, regAddrA);
111567 sqlite3VdbeJumpHere(v, j1);
111568
111569 /* Generate a coroutine to evaluate the SELECT statement on
111570 ** the right - the "B" select
111571 */
111572 addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;
111573 j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
111574 VdbeComment((v, "right SELECT"));
111575 savedLimit = p->iLimit;
111576 savedOffset = p->iOffset;
111577 p->iLimit = regLimitB;
111578 p->iOffset = 0;
@@ -111659,11 +111660,11 @@
111659 sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
111660 sqlite3VdbeGoto(v, labelCmpr);
111661
111662 /* This code runs once to initialize everything.
111663 */
111664 sqlite3VdbeJumpHere(v, j1);
111665 sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);
111666 sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
111667
111668 /* Implement the main merge loop
111669 */
@@ -113833,11 +113834,11 @@
113833 /* Processing for aggregates with GROUP BY is very different and
113834 ** much more complex than aggregates without a GROUP BY.
113835 */
113836 if( pGroupBy ){
113837 KeyInfo *pKeyInfo; /* Keying information for the group by clause */
113838 int j1; /* A-vs-B comparision jump */
113839 int addrOutputRow; /* Start of subroutine that outputs a result row */
113840 int regOutputRow; /* Return address register for output subroutine */
113841 int addrSetAbort; /* Set the abort flag and return */
113842 int addrTopOfLoop; /* Top of the input loop */
113843 int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */
@@ -113981,12 +113982,12 @@
113981 sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
113982 }
113983 }
113984 sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
113985 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
113986 j1 = sqlite3VdbeCurrentAddr(v);
113987 sqlite3VdbeAddOp3(v, OP_Jump, j1+1, 0, j1+1); VdbeCoverage(v);
113988
113989 /* Generate code that runs whenever the GROUP BY changes.
113990 ** Changes in the GROUP BY are detected by the previous code
113991 ** block. If there were no changes, this block is skipped.
113992 **
@@ -114004,11 +114005,11 @@
114004 VdbeComment((v, "reset accumulator"));
114005
114006 /* Update the aggregate accumulators based on the content of
114007 ** the current row
114008 */
114009 sqlite3VdbeJumpHere(v, j1);
114010 updateAccumulator(pParse, &sAggInfo);
114011 sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
114012 VdbeComment((v, "indicate data in accumulator"));
114013
114014 /* End of the loop
@@ -116133,11 +116134,11 @@
116133 }
116134 }
116135 }
116136
116137 if( !isView ){
116138 int j1 = 0; /* Address of jump instruction */
116139 int bReplace = 0; /* True if REPLACE conflict resolution might happen */
116140
116141 /* Do constraint checks. */
116142 assert( regOldRowid>0 );
116143 sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur,
@@ -116149,13 +116150,13 @@
116149 }
116150
116151 /* Delete the index entries associated with the current record. */
116152 if( bReplace || chngKey ){
116153 if( pPk ){
116154 j1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
116155 }else{
116156 j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
116157 }
116158 VdbeCoverageNeverTaken(v);
116159 }
116160 sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx, -1);
116161
@@ -116162,11 +116163,11 @@
116162 /* If changing the record number, delete the old record. */
116163 if( hasFK || chngKey || pPk!=0 ){
116164 sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);
116165 }
116166 if( bReplace || chngKey ){
116167 sqlite3VdbeJumpHere(v, j1);
116168 }
116169
116170 if( hasFK ){
116171 sqlite3FkCheck(pParse, pTab, 0, regNewRowid, aXRef, chngKey);
116172 }
@@ -119772,11 +119773,11 @@
119772 for(ii=0; ii<pOrWc->nTerm; ii++){
119773 WhereTerm *pOrTerm = &pOrWc->a[ii];
119774 if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
119775 WhereInfo *pSubWInfo; /* Info for single OR-term scan */
119776 Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */
119777 int j1 = 0; /* Address of jump operation */
119778 if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
119779 pAndExpr->pLeft = pOrExpr;
119780 pOrExpr = pAndExpr;
119781 }
119782 /* Loop through table entries that match term pOrTerm. */
@@ -119799,11 +119800,12 @@
119799 if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
119800 int r;
119801 int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
119802 if( HasRowid(pTab) ){
119803 r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
119804 j1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0, r,iSet);
 
119805 VdbeCoverage(v);
119806 }else{
119807 Index *pPk = sqlite3PrimaryKeyIndex(pTab);
119808 int nPk = pPk->nKeyCol;
119809 int iPk;
@@ -119829,11 +119831,11 @@
119829 ** is zero, assume that the key cannot already be present in
119830 ** the temp table. And if iSet is -1, assume that there is no
119831 ** need to insert the key into the temp table, as it will never
119832 ** be tested for. */
119833 if( iSet ){
119834 j1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
119835 VdbeCoverage(v);
119836 }
119837 if( iSet>=0 ){
119838 sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);
119839 sqlite3VdbeAddOp3(v, OP_IdxInsert, regRowset, regRowid, 0);
@@ -119848,11 +119850,11 @@
119848 /* Invoke the main loop body as a subroutine */
119849 sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
119850
119851 /* Jump here (skipping the main loop body subroutine) if the
119852 ** current sub-WHERE row is a duplicate from prior sub-WHEREs. */
119853 if( j1 ) sqlite3VdbeJumpHere(v, j1);
119854
119855 /* The pSubWInfo->untestedTerms flag means that this OR term
119856 ** contained one or more AND term from a notReady table. The
119857 ** terms from the notReady table could not be tested and will
119858 ** need to be tested later.
@@ -180360,18 +180362,20 @@
180360 ){
180361 Fts5Global *pGlobal = (Fts5Global*)pApi;
180362 int rc = sqlite3_overload_function(pGlobal->db, zName, -1);
180363 if( rc==SQLITE_OK ){
180364 Fts5Auxiliary *pAux;
 
180365 int nByte; /* Bytes of space to allocate */
180366
180367 nByte = sizeof(Fts5Auxiliary) + strlen(zName) + 1;
 
180368 pAux = (Fts5Auxiliary*)sqlite3_malloc(nByte);
180369 if( pAux ){
180370 memset(pAux, 0, nByte);
180371 pAux->zFunc = (char*)&pAux[1];
180372 strcpy(pAux->zFunc, zName);
180373 pAux->pGlobal = pGlobal;
180374 pAux->pUserData = pUserData;
180375 pAux->xFunc = xFunc;
180376 pAux->xDestroy = xDestroy;
180377 pAux->pNext = pGlobal->pAux;
@@ -180535,11 +180539,11 @@
180535 sqlite3_context *pCtx, /* Function call context */
180536 int nArg, /* Number of args */
180537 sqlite3_value **apVal /* Function arguments */
180538 ){
180539 assert( nArg==0 );
180540 sqlite3_result_text(pCtx, "fts5: 2015-10-09 13:42:52 aa8fdadf2defed00a28366a3b35a3e2eefecf0ed", -1, SQLITE_TRANSIENT);
180541 }
180542
180543 static int fts5Init(sqlite3 *db){
180544 static const sqlite3_module fts5Mod = {
180545 /* iVersion */ 2,
@@ -180639,11 +180643,10 @@
180639 #else
180640 SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
180641 return fts5Init(db);
180642 }
180643 #endif
180644
180645
180646 /*
180647 ** 2014 May 31
180648 **
180649 ** The author disclaims copyright to this source code. In place of
180650
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -325,11 +325,11 @@
325 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
326 ** [sqlite_version()] and [sqlite_source_id()].
327 */
328 #define SQLITE_VERSION "3.9.0"
329 #define SQLITE_VERSION_NUMBER 3009000
330 #define SQLITE_SOURCE_ID "2015-10-10 15:11:49 bc24a5bbfd95df3518611b221de69b73776111bc"
331
332 /*
333 ** CAPI3REF: Run-Time Library Version Numbers
334 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
335 **
@@ -86562,17 +86562,17 @@
86562 ** it contains any NULL entries. Cause the register at regHasNull to be set
86563 ** to a non-NULL value if iCur contains no NULLs. Cause register regHasNull
86564 ** to be set to NULL if iCur contains one or more NULL values.
86565 */
86566 static void sqlite3SetHasNullFlag(Vdbe *v, int iCur, int regHasNull){
86567 int addr1;
86568 sqlite3VdbeAddOp2(v, OP_Integer, 0, regHasNull);
86569 addr1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
86570 sqlite3VdbeAddOp3(v, OP_Column, iCur, 0, regHasNull);
86571 sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
86572 VdbeComment((v, "first_entry_in(%d)", iCur));
86573 sqlite3VdbeJumpHere(v, addr1);
86574 }
86575
86576
86577 #ifndef SQLITE_OMIT_SUBQUERY
86578 /*
@@ -87168,24 +87168,24 @@
87168 }else{
87169 /* In this branch, the RHS of the IN might contain a NULL and
87170 ** the presence of a NULL on the RHS makes a difference in the
87171 ** outcome.
87172 */
87173 int addr1;
87174
87175 /* First check to see if the LHS is contained in the RHS. If so,
87176 ** then the answer is TRUE the presence of NULLs in the RHS does
87177 ** not matter. If the LHS is not contained in the RHS, then the
87178 ** answer is NULL if the RHS contains NULLs and the answer is
87179 ** FALSE if the RHS is NULL-free.
87180 */
87181 addr1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
87182 VdbeCoverage(v);
87183 sqlite3VdbeAddOp2(v, OP_IsNull, rRhsHasNull, destIfNull);
87184 VdbeCoverage(v);
87185 sqlite3VdbeGoto(v, destIfFalse);
87186 sqlite3VdbeJumpHere(v, addr1);
87187 }
87188 }
87189 }
87190 sqlite3ReleaseTempReg(pParse, r1);
87191 sqlite3ExprCachePop(pParse);
@@ -89772,18 +89772,18 @@
89772 ** If that allocation failed, we would have quit before reaching this
89773 ** point */
89774 if( ALWAYS(v) ){
89775 int r1 = sqlite3GetTempReg(pParse);
89776 int r2 = sqlite3GetTempReg(pParse);
89777 int addr1;
89778 sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
89779 sqlite3VdbeUsesBtree(v, iDb);
89780 sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
89781 addr1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
89782 sqlite3VdbeChangeP5(v, SQLITE_NOTNULL); VdbeCoverage(v);
89783 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
89784 sqlite3VdbeJumpHere(v, addr1);
89785 sqlite3ReleaseTempReg(pParse, r1);
89786 sqlite3ReleaseTempReg(pParse, r2);
89787 }
89788 }
89789
@@ -93734,11 +93734,11 @@
93734 ** indices to be created and the table record must come before the
93735 ** indices. Hence, the record number for the table must be allocated
93736 ** now.
93737 */
93738 if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
93739 int addr1;
93740 int fileFormat;
93741 int reg1, reg2, reg3;
93742 /* nullRow[] is an OP_Record encoding of a row containing 5 NULLs */
93743 static const char nullRow[] = { 6, 0, 0, 0, 0, 0 };
93744 sqlite3BeginWriteOperation(pParse, 1, iDb);
@@ -93755,18 +93755,18 @@
93755 reg1 = pParse->regRowid = ++pParse->nMem;
93756 reg2 = pParse->regRoot = ++pParse->nMem;
93757 reg3 = ++pParse->nMem;
93758 sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
93759 sqlite3VdbeUsesBtree(v, iDb);
93760 addr1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
93761 fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
93762 1 : SQLITE_MAX_FILE_FORMAT;
93763 sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
93764 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
93765 sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
93766 sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
93767 sqlite3VdbeJumpHere(v, addr1);
93768
93769 /* This just creates a place-holder record in the sqlite_master table.
93770 ** The record created does not contain anything yet. It will be replaced
93771 ** by the real entry in code generated at sqlite3EndTable().
93772 **
@@ -102081,20 +102081,20 @@
102081 sqlite3 *db = pParse->db;
102082
102083 assert( v );
102084 for(p = pParse->pAinc; p; p = p->pNext){
102085 Db *pDb = &db->aDb[p->iDb];
102086 int addr1;
102087 int iRec;
102088 int memId = p->regCtr;
102089
102090 iRec = sqlite3GetTempReg(pParse);
102091 assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
102092 sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
102093 addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
102094 sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
102095 sqlite3VdbeJumpHere(v, addr1);
102096 sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
102097 sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
102098 sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
102099 sqlite3VdbeAddOp0(v, OP_Close);
102100 sqlite3ReleaseTempReg(pParse, iRec);
@@ -102582,21 +102582,21 @@
102582 ** not happened yet) so we substitute a rowid of -1
102583 */
102584 if( ipkColumn<0 ){
102585 sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
102586 }else{
102587 int addr1;
102588 assert( !withoutRowid );
102589 if( useTempTable ){
102590 sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regCols);
102591 }else{
102592 assert( pSelect==0 ); /* Otherwise useTempTable is true */
102593 sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regCols);
102594 }
102595 addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
102596 sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
102597 sqlite3VdbeJumpHere(v, addr1);
102598 sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols); VdbeCoverage(v);
102599 }
102600
102601 /* Cannot have triggers on a virtual table. If it were possible,
102602 ** this block would have to account for hidden column.
@@ -102666,18 +102666,18 @@
102666 }
102667 /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid
102668 ** to generate a unique primary key value.
102669 */
102670 if( !appendFlag ){
102671 int addr1;
102672 if( !IsVirtual(pTab) ){
102673 addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
102674 sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);
102675 sqlite3VdbeJumpHere(v, addr1);
102676 }else{
102677 addr1 = sqlite3VdbeCurrentAddr(v);
102678 sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, addr1+2); VdbeCoverage(v);
102679 }
102680 sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid); VdbeCoverage(v);
102681 }
102682 }else if( IsVirtual(pTab) || withoutRowid ){
102683 sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);
@@ -102927,11 +102927,11 @@
102927 sqlite3 *db; /* Database connection */
102928 int i; /* loop counter */
102929 int ix; /* Index loop counter */
102930 int nCol; /* Number of columns */
102931 int onError; /* Conflict resolution strategy */
102932 int addr1; /* Address of jump instruction */
102933 int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
102934 int nPkField; /* Number of fields in PRIMARY KEY. 1 for ROWID tables */
102935 int ipkTop = 0; /* Top of the rowid change constraint check */
102936 int ipkBottom = 0; /* Bottom of the rowid change constraint check */
102937 u8 isUpdate; /* True if this is an UPDATE operation */
@@ -102998,13 +102998,14 @@
102998 VdbeCoverage(v);
102999 break;
103000 }
103001 default: {
103002 assert( onError==OE_Replace );
103003 addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i);
103004 VdbeCoverage(v);
103005 sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i);
103006 sqlite3VdbeJumpHere(v, addr1);
103007 break;
103008 }
103009 }
103010 }
103011
@@ -105163,11 +105164,11 @@
105164 ** loading is supported. We need a dummy sqlite3Apis pointer for that
105165 ** code if regular extension loading is not available. This is that
105166 ** dummy pointer.
105167 */
105168 #ifdef SQLITE_OMIT_LOAD_EXTENSION
105169 static const sqlite3_api_routines sqlite3Apis;
105170 #endif
105171
105172
105173 /*
105174 ** The following object holds the list of automatically loaded
@@ -111198,16 +111199,16 @@
111199 iContinue = sqlite3VdbeMakeLabel(v);
111200
111201 /* Suppress duplicates for UNION, EXCEPT, and INTERSECT
111202 */
111203 if( regPrev ){
111204 int addr1, addr2;
111205 addr1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
111206 addr2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
111207 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
111208 sqlite3VdbeAddOp3(v, OP_Jump, addr2+2, iContinue, addr2+2); VdbeCoverage(v);
111209 sqlite3VdbeJumpHere(v, addr1);
111210 sqlite3VdbeAddOp3(v, OP_Copy, pIn->iSdst, regPrev+1, pIn->nSdst-1);
111211 sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
111212 }
111213 if( pParse->db->mallocFailed ) return 0;
111214
@@ -111420,11 +111421,11 @@
111421 int regPrev; /* A range of registers to hold previous output */
111422 int savedLimit; /* Saved value of p->iLimit */
111423 int savedOffset; /* Saved value of p->iOffset */
111424 int labelCmpr; /* Label for the start of the merge algorithm */
111425 int labelEnd; /* Label for the end of the overall SELECT stmt */
111426 int addr1; /* Jump instructions that get retargetted */
111427 int op; /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
111428 KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
111429 KeyInfo *pKeyMerge; /* Comparison information for merging rows */
111430 sqlite3 *db; /* Database connection */
111431 ExprList *pOrderBy; /* The ORDER BY clause */
@@ -111556,23 +111557,23 @@
111557
111558 /* Generate a coroutine to evaluate the SELECT statement to the
111559 ** left of the compound operator - the "A" select.
111560 */
111561 addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;
111562 addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
111563 VdbeComment((v, "left SELECT"));
111564 pPrior->iLimit = regLimitA;
111565 explainSetInteger(iSub1, pParse->iNextSelectId);
111566 sqlite3Select(pParse, pPrior, &destA);
111567 sqlite3VdbeAddOp1(v, OP_EndCoroutine, regAddrA);
111568 sqlite3VdbeJumpHere(v, addr1);
111569
111570 /* Generate a coroutine to evaluate the SELECT statement on
111571 ** the right - the "B" select
111572 */
111573 addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;
111574 addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
111575 VdbeComment((v, "right SELECT"));
111576 savedLimit = p->iLimit;
111577 savedOffset = p->iOffset;
111578 p->iLimit = regLimitB;
111579 p->iOffset = 0;
@@ -111659,11 +111660,11 @@
111660 sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
111661 sqlite3VdbeGoto(v, labelCmpr);
111662
111663 /* This code runs once to initialize everything.
111664 */
111665 sqlite3VdbeJumpHere(v, addr1);
111666 sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);
111667 sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
111668
111669 /* Implement the main merge loop
111670 */
@@ -113833,11 +113834,11 @@
113834 /* Processing for aggregates with GROUP BY is very different and
113835 ** much more complex than aggregates without a GROUP BY.
113836 */
113837 if( pGroupBy ){
113838 KeyInfo *pKeyInfo; /* Keying information for the group by clause */
113839 int addr1; /* A-vs-B comparision jump */
113840 int addrOutputRow; /* Start of subroutine that outputs a result row */
113841 int regOutputRow; /* Return address register for output subroutine */
113842 int addrSetAbort; /* Set the abort flag and return */
113843 int addrTopOfLoop; /* Top of the input loop */
113844 int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */
@@ -113981,12 +113982,12 @@
113982 sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
113983 }
113984 }
113985 sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
113986 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
113987 addr1 = sqlite3VdbeCurrentAddr(v);
113988 sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v);
113989
113990 /* Generate code that runs whenever the GROUP BY changes.
113991 ** Changes in the GROUP BY are detected by the previous code
113992 ** block. If there were no changes, this block is skipped.
113993 **
@@ -114004,11 +114005,11 @@
114005 VdbeComment((v, "reset accumulator"));
114006
114007 /* Update the aggregate accumulators based on the content of
114008 ** the current row
114009 */
114010 sqlite3VdbeJumpHere(v, addr1);
114011 updateAccumulator(pParse, &sAggInfo);
114012 sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
114013 VdbeComment((v, "indicate data in accumulator"));
114014
114015 /* End of the loop
@@ -116133,11 +116134,11 @@
116134 }
116135 }
116136 }
116137
116138 if( !isView ){
116139 int addr1 = 0; /* Address of jump instruction */
116140 int bReplace = 0; /* True if REPLACE conflict resolution might happen */
116141
116142 /* Do constraint checks. */
116143 assert( regOldRowid>0 );
116144 sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur,
@@ -116149,13 +116150,13 @@
116150 }
116151
116152 /* Delete the index entries associated with the current record. */
116153 if( bReplace || chngKey ){
116154 if( pPk ){
116155 addr1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
116156 }else{
116157 addr1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
116158 }
116159 VdbeCoverageNeverTaken(v);
116160 }
116161 sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx, -1);
116162
@@ -116162,11 +116163,11 @@
116163 /* If changing the record number, delete the old record. */
116164 if( hasFK || chngKey || pPk!=0 ){
116165 sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);
116166 }
116167 if( bReplace || chngKey ){
116168 sqlite3VdbeJumpHere(v, addr1);
116169 }
116170
116171 if( hasFK ){
116172 sqlite3FkCheck(pParse, pTab, 0, regNewRowid, aXRef, chngKey);
116173 }
@@ -119772,11 +119773,11 @@
119773 for(ii=0; ii<pOrWc->nTerm; ii++){
119774 WhereTerm *pOrTerm = &pOrWc->a[ii];
119775 if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
119776 WhereInfo *pSubWInfo; /* Info for single OR-term scan */
119777 Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */
119778 int jmp1 = 0; /* Address of jump operation */
119779 if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
119780 pAndExpr->pLeft = pOrExpr;
119781 pOrExpr = pAndExpr;
119782 }
119783 /* Loop through table entries that match term pOrTerm. */
@@ -119799,11 +119800,12 @@
119800 if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
119801 int r;
119802 int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
119803 if( HasRowid(pTab) ){
119804 r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
119805 jmp1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0,
119806 r,iSet);
119807 VdbeCoverage(v);
119808 }else{
119809 Index *pPk = sqlite3PrimaryKeyIndex(pTab);
119810 int nPk = pPk->nKeyCol;
119811 int iPk;
@@ -119829,11 +119831,11 @@
119831 ** is zero, assume that the key cannot already be present in
119832 ** the temp table. And if iSet is -1, assume that there is no
119833 ** need to insert the key into the temp table, as it will never
119834 ** be tested for. */
119835 if( iSet ){
119836 jmp1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
119837 VdbeCoverage(v);
119838 }
119839 if( iSet>=0 ){
119840 sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);
119841 sqlite3VdbeAddOp3(v, OP_IdxInsert, regRowset, regRowid, 0);
@@ -119848,11 +119850,11 @@
119850 /* Invoke the main loop body as a subroutine */
119851 sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
119852
119853 /* Jump here (skipping the main loop body subroutine) if the
119854 ** current sub-WHERE row is a duplicate from prior sub-WHEREs. */
119855 if( jmp1 ) sqlite3VdbeJumpHere(v, jmp1);
119856
119857 /* The pSubWInfo->untestedTerms flag means that this OR term
119858 ** contained one or more AND term from a notReady table. The
119859 ** terms from the notReady table could not be tested and will
119860 ** need to be tested later.
@@ -180360,18 +180362,20 @@
180362 ){
180363 Fts5Global *pGlobal = (Fts5Global*)pApi;
180364 int rc = sqlite3_overload_function(pGlobal->db, zName, -1);
180365 if( rc==SQLITE_OK ){
180366 Fts5Auxiliary *pAux;
180367 int nName; /* Size of zName in bytes, including \0 */
180368 int nByte; /* Bytes of space to allocate */
180369
180370 nName = (int)strlen(zName) + 1;
180371 nByte = sizeof(Fts5Auxiliary) + nName;
180372 pAux = (Fts5Auxiliary*)sqlite3_malloc(nByte);
180373 if( pAux ){
180374 memset(pAux, 0, nByte);
180375 pAux->zFunc = (char*)&pAux[1];
180376 memcpy(pAux->zFunc, zName, nName);
180377 pAux->pGlobal = pGlobal;
180378 pAux->pUserData = pUserData;
180379 pAux->xFunc = xFunc;
180380 pAux->xDestroy = xDestroy;
180381 pAux->pNext = pGlobal->pAux;
@@ -180535,11 +180539,11 @@
180539 sqlite3_context *pCtx, /* Function call context */
180540 int nArg, /* Number of args */
180541 sqlite3_value **apVal /* Function arguments */
180542 ){
180543 assert( nArg==0 );
180544 sqlite3_result_text(pCtx, "fts5: 2015-10-10 15:11:49 bc24a5bbfd95df3518611b221de69b73776111bc", -1, SQLITE_TRANSIENT);
180545 }
180546
180547 static int fts5Init(sqlite3 *db){
180548 static const sqlite3_module fts5Mod = {
180549 /* iVersion */ 2,
@@ -180639,11 +180643,10 @@
180643 #else
180644 SQLITE_PRIVATE int sqlite3Fts5Init(sqlite3 *db){
180645 return fts5Init(db);
180646 }
180647 #endif
 
180648
180649 /*
180650 ** 2014 May 31
180651 **
180652 ** The author disclaims copyright to this source code. In place of
180653
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114114
#define SQLITE_VERSION "3.9.0"
115115
#define SQLITE_VERSION_NUMBER 3009000
116
-#define SQLITE_SOURCE_ID "2015-10-10 14:00:37 de28acd42f29693341feb884b7223cd3d2b96730"
116
+#define SQLITE_SOURCE_ID "2015-10-10 15:11:49 bc24a5bbfd95df3518611b221de69b73776111bc"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
122122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.9.0"
115 #define SQLITE_VERSION_NUMBER 3009000
116 #define SQLITE_SOURCE_ID "2015-10-10 14:00:37 de28acd42f29693341feb884b7223cd3d2b96730"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.9.0"
115 #define SQLITE_VERSION_NUMBER 3009000
116 #define SQLITE_SOURCE_ID "2015-10-10 15:11:49 bc24a5bbfd95df3518611b221de69b73776111bc"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122

Keyboard Shortcuts

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