Fossil SCM

Bring in the latest SQLite with VDBE and Btree performance optimizations.

drh 2013-08-20 04:06 trunk
Commit 187845b5746ec92334dc4f55717740a9642bfe38
2 files changed +111 -65 +1 -1
+111 -65
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -656,11 +656,11 @@
656656
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
657657
** [sqlite_version()] and [sqlite_source_id()].
658658
*/
659659
#define SQLITE_VERSION "3.8.0"
660660
#define SQLITE_VERSION_NUMBER 3008000
661
-#define SQLITE_SOURCE_ID "2013-08-19 11:15:48 a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a"
661
+#define SQLITE_SOURCE_ID "2013-08-20 03:13:51 7f72fc4f47445a2c01910b268335873de9f75059"
662662
663663
/*
664664
** CAPI3REF: Run-Time Library Version Numbers
665665
** KEYWORDS: sqlite3_version, sqlite3_sourceid
666666
**
@@ -13486,14 +13486,15 @@
1348613486
struct sqlite3_context {
1348713487
FuncDef *pFunc; /* Pointer to function information. MUST BE FIRST */
1348813488
Mem s; /* The return value is stored here */
1348913489
Mem *pMem; /* Memory cell used to store aggregate context */
1349013490
CollSeq *pColl; /* Collating sequence */
13491
- int isError; /* Error code returned by the function. */
13492
- int skipFlag; /* Skip skip accumulator loading if true */
13491
+ Vdbe *pVdbe; /* The VM that owns this context */
1349313492
int iOp; /* Instruction number of OP_Function */
13494
- Vdbe *pVdbe; /* The VM that owns this context */
13493
+ int isError; /* Error code returned by the function. */
13494
+ u8 skipFlag; /* Skip skip accumulator loading if true */
13495
+ u8 fErrorOrAux; /* isError!=0 or pVdbe->pAuxData modified */
1349513496
};
1349613497
1349713498
/*
1349813499
** An Explain object accumulates indented output which is helpful
1349913500
** in describing recursive data structures.
@@ -13565,11 +13566,11 @@
1356513566
bft doingRerun:1; /* True if rerunning after an auto-reprepare */
1356613567
int nChange; /* Number of db changes made since last reset */
1356713568
yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
1356813569
yDbMask lockMask; /* Subset of btreeMask that requires a lock */
1356913570
int iStatement; /* Statement number (or 0 if has not opened stmt) */
13570
- int aCounter[4]; /* Counters used by sqlite3_stmt_status() */
13571
+ u32 aCounter[5]; /* Counters used by sqlite3_stmt_status() */
1357113572
#ifndef SQLITE_OMIT_TRACE
1357213573
i64 startTime; /* Time when query started - used for profiling */
1357313574
#endif
1357413575
i64 nFkConstraint; /* Number of imm. FK constraints this VM */
1357513576
i64 nStmtDefCons; /* Number of def. constraints when stmt started */
@@ -37447,10 +37448,11 @@
3744737448
}
3744837449
3744937450
if( pCache->nPage>=pCache->nHash && pcache1ResizeHash(pCache) ){
3745037451
goto fetch_out;
3745137452
}
37453
+ assert( pCache->nHash>0 && pCache->apHash );
3745237454
3745337455
/* Step 4. Try to recycle a page. */
3745437456
if( pCache->bPurgeable && pGroup->pLruTail && (
3745537457
(pCache->nPage+1>=pCache->nMax)
3745637458
|| pGroup->nCurrentPage>=pGroup->nMaxPage
@@ -49181,18 +49183,23 @@
4918149183
};
4918249184
4918349185
/*
4918449186
** Potential values for BtCursor.eState.
4918549187
**
49186
-** CURSOR_VALID:
49187
-** Cursor points to a valid entry. getPayload() etc. may be called.
49188
-**
4918949188
** CURSOR_INVALID:
4919049189
** Cursor does not point to a valid entry. This can happen (for example)
4919149190
** because the table is empty or because BtreeCursorFirst() has not been
4919249191
** called.
4919349192
**
49193
+** CURSOR_VALID:
49194
+** Cursor points to a valid entry. getPayload() etc. may be called.
49195
+**
49196
+** CURSOR_SKIPNEXT:
49197
+** Cursor is valid except that the Cursor.skipNext field is non-zero
49198
+** indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious()
49199
+** operation should be a no-op.
49200
+**
4919449201
** CURSOR_REQUIRESEEK:
4919549202
** The table that this cursor was opened on still exists, but has been
4919649203
** modified since the cursor was last used. The cursor position is saved
4919749204
** in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in
4919849205
** this state, restoreCursorPosition() can be called to attempt to
@@ -49205,12 +49212,13 @@
4920549212
** Do nothing else with this cursor. Any attempt to use the cursor
4920649213
** should return the error code stored in BtCursor.skip
4920749214
*/
4920849215
#define CURSOR_INVALID 0
4920949216
#define CURSOR_VALID 1
49210
-#define CURSOR_REQUIRESEEK 2
49211
-#define CURSOR_FAULT 3
49217
+#define CURSOR_SKIPNEXT 2
49218
+#define CURSOR_REQUIRESEEK 3
49219
+#define CURSOR_FAULT 4
4921249220
4921349221
/*
4921449222
** The database page the PENDING_BYTE occupies. This page is never used.
4921549223
*/
4921649224
# define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)
@@ -50320,10 +50328,13 @@
5032050328
rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext);
5032150329
if( rc==SQLITE_OK ){
5032250330
sqlite3_free(pCur->pKey);
5032350331
pCur->pKey = 0;
5032450332
assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
50333
+ if( pCur->skipNext && pCur->eState==CURSOR_VALID ){
50334
+ pCur->eState = CURSOR_SKIPNEXT;
50335
+ }
5032550336
}
5032650337
return rc;
5032750338
}
5032850339
5032950340
#define restoreCursorPosition(p) \
@@ -50345,11 +50356,11 @@
5034550356
rc = restoreCursorPosition(pCur);
5034650357
if( rc ){
5034750358
*pHasMoved = 1;
5034850359
return rc;
5034950360
}
50350
- if( pCur->eState!=CURSOR_VALID || pCur->skipNext!=0 ){
50361
+ if( pCur->eState!=CURSOR_VALID || NEVER(pCur->skipNext!=0) ){
5035150362
*pHasMoved = 1;
5035250363
}else{
5035350364
*pHasMoved = 0;
5035450365
}
5035550366
return SQLITE_OK;
@@ -54392,25 +54403,33 @@
5439254403
int rc;
5439354404
int idx;
5439454405
MemPage *pPage;
5439554406
5439654407
assert( cursorHoldsMutex(pCur) );
54397
- rc = restoreCursorPosition(pCur);
54398
- if( rc!=SQLITE_OK ){
54399
- return rc;
54400
- }
5440154408
assert( pRes!=0 );
54402
- if( CURSOR_INVALID==pCur->eState ){
54403
- *pRes = 1;
54404
- return SQLITE_OK;
54405
- }
54406
- if( pCur->skipNext>0 ){
54407
- pCur->skipNext = 0;
54408
- *pRes = 0;
54409
- return SQLITE_OK;
54410
- }
54411
- pCur->skipNext = 0;
54409
+ assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
54410
+ if( pCur->eState!=CURSOR_VALID ){
54411
+ rc = restoreCursorPosition(pCur);
54412
+ if( rc!=SQLITE_OK ){
54413
+ *pRes = 0;
54414
+ return rc;
54415
+ }
54416
+ if( CURSOR_INVALID==pCur->eState ){
54417
+ *pRes = 1;
54418
+ return SQLITE_OK;
54419
+ }
54420
+ if( pCur->skipNext ){
54421
+ assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT );
54422
+ pCur->eState = CURSOR_VALID;
54423
+ if( pCur->skipNext>0 ){
54424
+ pCur->skipNext = 0;
54425
+ *pRes = 0;
54426
+ return SQLITE_OK;
54427
+ }
54428
+ pCur->skipNext = 0;
54429
+ }
54430
+ }
5441254431
5441354432
pPage = pCur->apPage[pCur->iPage];
5441454433
idx = ++pCur->aiIdx[pCur->iPage];
5441554434
assert( pPage->isInit );
5441654435
@@ -54424,11 +54443,14 @@
5442454443
pCur->info.nSize = 0;
5442554444
pCur->validNKey = 0;
5442654445
if( idx>=pPage->nCell ){
5442754446
if( !pPage->leaf ){
5442854447
rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
54429
- if( rc ) return rc;
54448
+ if( rc ){
54449
+ *pRes = 0;
54450
+ return rc;
54451
+ }
5443054452
rc = moveToLeftmost(pCur);
5443154453
*pRes = 0;
5443254454
return rc;
5443354455
}
5443454456
do{
@@ -54466,32 +54488,44 @@
5446654488
SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
5446754489
int rc;
5446854490
MemPage *pPage;
5446954491
5447054492
assert( cursorHoldsMutex(pCur) );
54471
- rc = restoreCursorPosition(pCur);
54472
- if( rc!=SQLITE_OK ){
54473
- return rc;
54474
- }
54493
+ assert( pRes!=0 );
54494
+ assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
5447554495
pCur->atLast = 0;
54476
- if( CURSOR_INVALID==pCur->eState ){
54477
- *pRes = 1;
54478
- return SQLITE_OK;
54479
- }
54480
- if( pCur->skipNext<0 ){
54481
- pCur->skipNext = 0;
54482
- *pRes = 0;
54483
- return SQLITE_OK;
54484
- }
54485
- pCur->skipNext = 0;
54496
+ if( pCur->eState!=CURSOR_VALID ){
54497
+ if( ALWAYS(pCur->eState>=CURSOR_REQUIRESEEK) ){
54498
+ rc = btreeRestoreCursorPosition(pCur);
54499
+ if( rc!=SQLITE_OK ){
54500
+ *pRes = 0;
54501
+ return rc;
54502
+ }
54503
+ }
54504
+ if( CURSOR_INVALID==pCur->eState ){
54505
+ *pRes = 1;
54506
+ return SQLITE_OK;
54507
+ }
54508
+ if( pCur->skipNext ){
54509
+ assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT );
54510
+ pCur->eState = CURSOR_VALID;
54511
+ if( pCur->skipNext<0 ){
54512
+ pCur->skipNext = 0;
54513
+ *pRes = 0;
54514
+ return SQLITE_OK;
54515
+ }
54516
+ pCur->skipNext = 0;
54517
+ }
54518
+ }
5448654519
5448754520
pPage = pCur->apPage[pCur->iPage];
5448854521
assert( pPage->isInit );
5448954522
if( !pPage->leaf ){
5449054523
int idx = pCur->aiIdx[pCur->iPage];
5449154524
rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
5449254525
if( rc ){
54526
+ *pRes = 0;
5449354527
return rc;
5449454528
}
5449554529
rc = moveToRightmost(pCur);
5449654530
}else{
5449754531
while( pCur->aiIdx[pCur->iPage]==0 ){
@@ -63508,16 +63542,18 @@
6350863542
sqlite3VdbeMemSetDouble(&pCtx->s, rVal);
6350963543
}
6351063544
SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
6351163545
assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
6351263546
pCtx->isError = SQLITE_ERROR;
63547
+ pCtx->fErrorOrAux = 1;
6351363548
sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
6351463549
}
6351563550
#ifndef SQLITE_OMIT_UTF16
6351663551
SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
6351763552
assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
6351863553
pCtx->isError = SQLITE_ERROR;
63554
+ pCtx->fErrorOrAux = 1;
6351963555
sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
6352063556
}
6352163557
#endif
6352263558
SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
6352363559
assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
@@ -63577,10 +63613,11 @@
6357763613
assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
6357863614
sqlite3VdbeMemSetZeroBlob(&pCtx->s, n);
6357963615
}
6358063616
SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
6358163617
pCtx->isError = errCode;
63618
+ pCtx->fErrorOrAux = 1;
6358263619
if( pCtx->s.flags & MEM_Null ){
6358363620
sqlite3VdbeMemSetStr(&pCtx->s, sqlite3ErrStr(errCode), -1,
6358463621
SQLITE_UTF8, SQLITE_STATIC);
6358563622
}
6358663623
}
@@ -63587,19 +63624,21 @@
6358763624
6358863625
/* Force an SQLITE_TOOBIG error. */
6358963626
SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
6359063627
assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
6359163628
pCtx->isError = SQLITE_TOOBIG;
63629
+ pCtx->fErrorOrAux = 1;
6359263630
sqlite3VdbeMemSetStr(&pCtx->s, "string or blob too big", -1,
6359363631
SQLITE_UTF8, SQLITE_STATIC);
6359463632
}
6359563633
6359663634
/* An SQLITE_NOMEM error. */
6359763635
SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
6359863636
assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
6359963637
sqlite3VdbeMemSetNull(&pCtx->s);
6360063638
pCtx->isError = SQLITE_NOMEM;
63639
+ pCtx->fErrorOrAux = 1;
6360163640
pCtx->s.db->mallocFailed = 1;
6360263641
}
6360363642
6360463643
/*
6360563644
** This function is called after a transaction has been committed. It
@@ -63918,10 +63957,14 @@
6391863957
if( !pAuxData ) goto failed;
6391963958
pAuxData->iOp = pCtx->iOp;
6392063959
pAuxData->iArg = iArg;
6392163960
pAuxData->pNext = pVdbe->pAuxData;
6392263961
pVdbe->pAuxData = pAuxData;
63962
+ if( pCtx->fErrorOrAux==0 ){
63963
+ pCtx->isError = 0;
63964
+ pCtx->fErrorOrAux = 1;
63965
+ }
6392363966
}else if( pAuxData->xDelete ){
6392463967
pAuxData->xDelete(pAuxData->pAux);
6392563968
}
6392663969
6392763970
pAuxData->pAux = pAux;
@@ -64586,13 +64629,13 @@
6458664629
/*
6458764630
** Return the value of a status counter for a prepared statement
6458864631
*/
6458964632
SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
6459064633
Vdbe *pVdbe = (Vdbe*)pStmt;
64591
- int v = pVdbe->aCounter[op-1];
64592
- if( resetFlag ) pVdbe->aCounter[op-1] = 0;
64593
- return v;
64634
+ u32 v = pVdbe->aCounter[op];
64635
+ if( resetFlag ) pVdbe->aCounter[op] = 0;
64636
+ return (int)v;
6459464637
}
6459564638
6459664639
/************** End of vdbeapi.c *********************************************/
6459764640
/************** Begin file vdbetrace.c ***************************************/
6459864641
/*
@@ -65995,11 +66038,11 @@
6599566038
CHECK_FOR_INTERRUPT;
6599666039
sqlite3VdbeIOTraceSql(p);
6599766040
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
6599866041
if( db->xProgress ){
6599966042
assert( 0 < db->nProgressOps );
66000
- nProgressLimit = (unsigned)p->aCounter[SQLITE_STMTSTATUS_VM_STEP-1];
66043
+ nProgressLimit = (unsigned)p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
6600166044
if( nProgressLimit==0 ){
6600266045
nProgressLimit = db->nProgressOps;
6600366046
}else{
6600466047
nProgressLimit %= (unsigned)db->nProgressOps;
6600566048
}
@@ -66874,11 +66917,11 @@
6687466917
** the already allocated buffer instead of allocating a new one.
6687566918
*/
6687666919
sqlite3VdbeMemMove(&u.ai.ctx.s, pOut);
6687766920
MemSetTypeFlag(&u.ai.ctx.s, MEM_Null);
6687866921
66879
- u.ai.ctx.isError = 0;
66922
+ u.ai.ctx.fErrorOrAux = 0;
6688066923
if( u.ai.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
6688166924
assert( pOp>aOp );
6688266925
assert( pOp[-1].p4type==P4_COLLSEQ );
6688366926
assert( pOp[-1].opcode==OP_CollSeq );
6688466927
u.ai.ctx.pColl = pOp[-1].p4.pColl;
@@ -66885,15 +66928,10 @@
6688566928
}
6688666929
db->lastRowid = lastRowid;
6688766930
(*u.ai.ctx.pFunc->xFunc)(&u.ai.ctx, u.ai.n, u.ai.apVal); /* IMP: R-24505-23230 */
6688866931
lastRowid = db->lastRowid;
6688966932
66890
- /* If any auxiliary data functions have been called by this user function,
66891
- ** immediately call the destructor for any non-static values.
66892
- */
66893
- sqlite3VdbeDeleteAuxData(p, pc, pOp->p1);
66894
-
6689566933
if( db->mallocFailed ){
6689666934
/* Even though a malloc() has failed, the implementation of the
6689766935
** user function may have called an sqlite3_result_XXX() function
6689866936
** to return a value. The following call releases any resources
6689966937
** associated with such a value.
@@ -66901,13 +66939,16 @@
6690166939
sqlite3VdbeMemRelease(&u.ai.ctx.s);
6690266940
goto no_mem;
6690366941
}
6690466942
6690566943
/* If the function returned an error, throw an exception */
66906
- if( u.ai.ctx.isError ){
66907
- sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.ai.ctx.s));
66908
- rc = u.ai.ctx.isError;
66944
+ if( u.ai.ctx.fErrorOrAux ){
66945
+ if( u.ai.ctx.isError ){
66946
+ sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.ai.ctx.s));
66947
+ rc = u.ai.ctx.isError;
66948
+ }
66949
+ sqlite3VdbeDeleteAuxData(p, pc, pOp->p1);
6690966950
}
6691066951
6691166952
/* Copy the result of the function into register P3 */
6691266953
sqlite3VdbeChangeEncoding(&u.ai.ctx.s, encoding);
6691366954
sqlite3VdbeMemMove(pOut, &u.ai.ctx.s);
@@ -67279,16 +67320,16 @@
6727967320
}else{
6728067321
/* SQLITE_NULLEQ is clear and at least one operand is NULL,
6728167322
** then the result is always NULL.
6728267323
** The jump is taken if the SQLITE_JUMPIFNULL bit is set.
6728367324
*/
67284
- if( pOp->p5 & SQLITE_STOREP2 ){
67325
+ if( pOp->p5 & SQLITE_JUMPIFNULL ){
67326
+ pc = pOp->p2-1;
67327
+ }else if( pOp->p5 & SQLITE_STOREP2 ){
6728567328
pOut = &aMem[pOp->p2];
6728667329
MemSetTypeFlag(pOut, MEM_Null);
6728767330
REGISTER_TRACE(pOp->p2, pOut);
67288
- }else if( pOp->p5 & SQLITE_JUMPIFNULL ){
67289
- pc = pOp->p2-1;
6729067331
}
6729167332
break;
6729267333
}
6729367334
}else{
6729467335
/* Neither operand is NULL. Do a comparison. */
@@ -69931,11 +69972,11 @@
6993169972
case OP_Sort: { /* jump */
6993269973
#ifdef SQLITE_TEST
6993369974
sqlite3_sort_count++;
6993469975
sqlite3_search_count--;
6993569976
#endif
69936
- p->aCounter[SQLITE_STMTSTATUS_SORT-1]++;
69977
+ p->aCounter[SQLITE_STMTSTATUS_SORT]++;
6993769978
/* Fall through into OP_Rewind */
6993869979
}
6993969980
/* Opcode: Rewind P1 P2 * * *
6994069981
**
6994169982
** The next use of the Rowid or Column or Next instruction for P1
@@ -70014,21 +70055,21 @@
7001470055
VdbeCursor *pC;
7001570056
int res;
7001670057
#endif /* local variables moved into u.br */
7001770058
7001870059
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
70019
- assert( pOp->p5<=ArraySize(p->aCounter) );
70060
+ assert( pOp->p5<ArraySize(p->aCounter) );
7002070061
u.br.pC = p->apCsr[pOp->p1];
7002170062
if( u.br.pC==0 ){
7002270063
break; /* See ticket #2273 */
7002370064
}
7002470065
assert( u.br.pC->isSorter==(pOp->opcode==OP_SorterNext) );
7002570066
if( isSorter(u.br.pC) ){
7002670067
assert( pOp->opcode==OP_SorterNext );
7002770068
rc = sqlite3VdbeSorterNext(db, u.br.pC, &u.br.res);
7002870069
}else{
70029
- u.br.res = 1;
70070
+ /* u.br.res = 1; // Always initialized by the xAdvance() call */
7003070071
assert( u.br.pC->deferredMoveto==0 );
7003170072
assert( u.br.pC->pCursor );
7003270073
assert( pOp->opcode!=OP_Next || pOp->p4.xAdvance==sqlite3BtreeNext );
7003370074
assert( pOp->opcode!=OP_Prev || pOp->p4.xAdvance==sqlite3BtreePrevious );
7003470075
rc = pOp->p4.xAdvance(u.br.pC->pCursor, &u.br.res);
@@ -70035,11 +70076,11 @@
7003570076
}
7003670077
u.br.pC->nullRow = (u8)u.br.res;
7003770078
u.br.pC->cacheStatus = CACHE_STALE;
7003870079
if( u.br.res==0 ){
7003970080
pc = pOp->p2 - 1;
70040
- if( pOp->p5 ) p->aCounter[pOp->p5-1]++;
70081
+ p->aCounter[pOp->p5]++;
7004170082
#ifdef SQLITE_TEST
7004270083
sqlite3_search_count++;
7004370084
#endif
7004470085
}
7004570086
u.br.pC->rowidIsValid = 0;
@@ -71792,11 +71833,11 @@
7179271833
** release the mutexes on btrees that were acquired at the
7179371834
** top. */
7179471835
vdbe_return:
7179571836
db->lastRowid = lastRowid;
7179671837
testcase( nVmStep>0 );
71797
- p->aCounter[SQLITE_STMTSTATUS_VM_STEP-1] += (int)nVmStep;
71838
+ p->aCounter[SQLITE_STMTSTATUS_VM_STEP] += (int)nVmStep;
7179871839
sqlite3VdbeLeave(p);
7179971840
return rc;
7180071841
7180171842
/* Jump to here if a string or blob larger than SQLITE_MAX_LENGTH
7180271843
** is encountered.
@@ -76717,10 +76758,11 @@
7671776758
break;
7671876759
}
7671976760
case TK_UMINUS: {
7672076761
int v;
7672176762
if( sqlite3ExprIsInteger(p->pLeft, &v) ){
76763
+ assert( v!=-2147483648 );
7672276764
*pValue = -v;
7672376765
rc = 1;
7672476766
}
7672576767
break;
7672676768
}
@@ -109074,11 +109116,13 @@
109074109116
rLogSize = estLog(whereCost(pProbe->aiRowEst[0]));
109075109117
for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
109076109118
int nIn = 0;
109077109119
if( pTerm->prereqRight & pNew->maskSelf ) continue;
109078109120
#ifdef SQLITE_ENABLE_STAT3
109079
- if( (pTerm->wtFlags & TERM_VNULL)!=0 && pSrc->pTab->aCol[iCol].notNull ){
109121
+ if( (pTerm->wtFlags & TERM_VNULL)!=0
109122
+ && (iCol<0 || pSrc->pTab->aCol[iCol].notNull)
109123
+ ){
109080109124
continue; /* skip IS NOT NULL constraints on a NOT NULL column */
109081109125
}
109082109126
#endif
109083109127
pNew->wsFlags = saved_wsFlags;
109084109128
pNew->u.btree.nEq = saved_nEq;
@@ -109217,10 +109261,11 @@
109217109261
static Bitmask columnsInIndex(Index *pIdx){
109218109262
Bitmask m = 0;
109219109263
int j;
109220109264
for(j=pIdx->nColumn-1; j>=0; j--){
109221109265
int x = pIdx->aiColumn[j];
109266
+ assert( x>=0 );
109222109267
testcase( x==BMS-1 );
109223109268
testcase( x==BMS-2 );
109224109269
if( x<BMS-1 ) m |= MASKBIT(x);
109225109270
}
109226109271
return m;
@@ -130932,11 +130977,11 @@
130932130977
while( 1 ){
130933130978
130934130979
/* The following line of code (and the "p++" below the while() loop) is
130935130980
** normally all that is required to move pointer p to the desired
130936130981
** position. The exception is if this node is being loaded from disk
130937
- ** incrementally and pointer "p" now points to the first byte passed
130982
+ ** incrementally and pointer "p" now points to the first byte past
130938130983
** the populated part of pReader->aNode[].
130939130984
*/
130940130985
while( *p | c ) c = *p++ & 0x80;
130941130986
assert( *p==0 );
130942130987
@@ -132319,12 +132364,12 @@
132319132364
fts3SegReaderFirstDocid(p, apSegment[i]);
132320132365
}
132321132366
fts3SegReaderSort(apSegment, nMerge, nMerge, xCmp);
132322132367
while( apSegment[0]->pOffsetList ){
132323132368
int j; /* Number of segments that share a docid */
132324
- char *pList;
132325
- int nList;
132369
+ char *pList = 0;
132370
+ int nList = 0;
132326132371
int nByte;
132327132372
sqlite3_int64 iDocid = apSegment[0]->iDocid;
132328132373
fts3SegReaderNextDocid(p, apSegment[0], &pList, &nList);
132329132374
j = 1;
132330132375
while( j<nMerge
@@ -135393,10 +135438,11 @@
135393135438
return SQLITE_NOMEM;
135394135439
}
135395135440
pStr->z = zNew;
135396135441
pStr->nAlloc = nAlloc;
135397135442
}
135443
+ assert( pStr->z!=0 && (pStr->nAlloc >= pStr->n+nAppend+1) );
135398135444
135399135445
/* Append the data to the string buffer. */
135400135446
memcpy(&pStr->z[pStr->n], zAppend, nAppend);
135401135447
pStr->n += nAppend;
135402135448
pStr->z[pStr->n] = '\0';
135403135449
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -656,11 +656,11 @@
656 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
657 ** [sqlite_version()] and [sqlite_source_id()].
658 */
659 #define SQLITE_VERSION "3.8.0"
660 #define SQLITE_VERSION_NUMBER 3008000
661 #define SQLITE_SOURCE_ID "2013-08-19 11:15:48 a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a"
662
663 /*
664 ** CAPI3REF: Run-Time Library Version Numbers
665 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
666 **
@@ -13486,14 +13486,15 @@
13486 struct sqlite3_context {
13487 FuncDef *pFunc; /* Pointer to function information. MUST BE FIRST */
13488 Mem s; /* The return value is stored here */
13489 Mem *pMem; /* Memory cell used to store aggregate context */
13490 CollSeq *pColl; /* Collating sequence */
13491 int isError; /* Error code returned by the function. */
13492 int skipFlag; /* Skip skip accumulator loading if true */
13493 int iOp; /* Instruction number of OP_Function */
13494 Vdbe *pVdbe; /* The VM that owns this context */
 
 
13495 };
13496
13497 /*
13498 ** An Explain object accumulates indented output which is helpful
13499 ** in describing recursive data structures.
@@ -13565,11 +13566,11 @@
13565 bft doingRerun:1; /* True if rerunning after an auto-reprepare */
13566 int nChange; /* Number of db changes made since last reset */
13567 yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
13568 yDbMask lockMask; /* Subset of btreeMask that requires a lock */
13569 int iStatement; /* Statement number (or 0 if has not opened stmt) */
13570 int aCounter[4]; /* Counters used by sqlite3_stmt_status() */
13571 #ifndef SQLITE_OMIT_TRACE
13572 i64 startTime; /* Time when query started - used for profiling */
13573 #endif
13574 i64 nFkConstraint; /* Number of imm. FK constraints this VM */
13575 i64 nStmtDefCons; /* Number of def. constraints when stmt started */
@@ -37447,10 +37448,11 @@
37447 }
37448
37449 if( pCache->nPage>=pCache->nHash && pcache1ResizeHash(pCache) ){
37450 goto fetch_out;
37451 }
 
37452
37453 /* Step 4. Try to recycle a page. */
37454 if( pCache->bPurgeable && pGroup->pLruTail && (
37455 (pCache->nPage+1>=pCache->nMax)
37456 || pGroup->nCurrentPage>=pGroup->nMaxPage
@@ -49181,18 +49183,23 @@
49181 };
49182
49183 /*
49184 ** Potential values for BtCursor.eState.
49185 **
49186 ** CURSOR_VALID:
49187 ** Cursor points to a valid entry. getPayload() etc. may be called.
49188 **
49189 ** CURSOR_INVALID:
49190 ** Cursor does not point to a valid entry. This can happen (for example)
49191 ** because the table is empty or because BtreeCursorFirst() has not been
49192 ** called.
49193 **
 
 
 
 
 
 
 
 
49194 ** CURSOR_REQUIRESEEK:
49195 ** The table that this cursor was opened on still exists, but has been
49196 ** modified since the cursor was last used. The cursor position is saved
49197 ** in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in
49198 ** this state, restoreCursorPosition() can be called to attempt to
@@ -49205,12 +49212,13 @@
49205 ** Do nothing else with this cursor. Any attempt to use the cursor
49206 ** should return the error code stored in BtCursor.skip
49207 */
49208 #define CURSOR_INVALID 0
49209 #define CURSOR_VALID 1
49210 #define CURSOR_REQUIRESEEK 2
49211 #define CURSOR_FAULT 3
 
49212
49213 /*
49214 ** The database page the PENDING_BYTE occupies. This page is never used.
49215 */
49216 # define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)
@@ -50320,10 +50328,13 @@
50320 rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext);
50321 if( rc==SQLITE_OK ){
50322 sqlite3_free(pCur->pKey);
50323 pCur->pKey = 0;
50324 assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
 
 
 
50325 }
50326 return rc;
50327 }
50328
50329 #define restoreCursorPosition(p) \
@@ -50345,11 +50356,11 @@
50345 rc = restoreCursorPosition(pCur);
50346 if( rc ){
50347 *pHasMoved = 1;
50348 return rc;
50349 }
50350 if( pCur->eState!=CURSOR_VALID || pCur->skipNext!=0 ){
50351 *pHasMoved = 1;
50352 }else{
50353 *pHasMoved = 0;
50354 }
50355 return SQLITE_OK;
@@ -54392,25 +54403,33 @@
54392 int rc;
54393 int idx;
54394 MemPage *pPage;
54395
54396 assert( cursorHoldsMutex(pCur) );
54397 rc = restoreCursorPosition(pCur);
54398 if( rc!=SQLITE_OK ){
54399 return rc;
54400 }
54401 assert( pRes!=0 );
54402 if( CURSOR_INVALID==pCur->eState ){
54403 *pRes = 1;
54404 return SQLITE_OK;
54405 }
54406 if( pCur->skipNext>0 ){
54407 pCur->skipNext = 0;
54408 *pRes = 0;
54409 return SQLITE_OK;
54410 }
54411 pCur->skipNext = 0;
 
 
 
 
 
 
 
 
 
 
 
 
54412
54413 pPage = pCur->apPage[pCur->iPage];
54414 idx = ++pCur->aiIdx[pCur->iPage];
54415 assert( pPage->isInit );
54416
@@ -54424,11 +54443,14 @@
54424 pCur->info.nSize = 0;
54425 pCur->validNKey = 0;
54426 if( idx>=pPage->nCell ){
54427 if( !pPage->leaf ){
54428 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
54429 if( rc ) return rc;
 
 
 
54430 rc = moveToLeftmost(pCur);
54431 *pRes = 0;
54432 return rc;
54433 }
54434 do{
@@ -54466,32 +54488,44 @@
54466 SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
54467 int rc;
54468 MemPage *pPage;
54469
54470 assert( cursorHoldsMutex(pCur) );
54471 rc = restoreCursorPosition(pCur);
54472 if( rc!=SQLITE_OK ){
54473 return rc;
54474 }
54475 pCur->atLast = 0;
54476 if( CURSOR_INVALID==pCur->eState ){
54477 *pRes = 1;
54478 return SQLITE_OK;
54479 }
54480 if( pCur->skipNext<0 ){
54481 pCur->skipNext = 0;
54482 *pRes = 0;
54483 return SQLITE_OK;
54484 }
54485 pCur->skipNext = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
54486
54487 pPage = pCur->apPage[pCur->iPage];
54488 assert( pPage->isInit );
54489 if( !pPage->leaf ){
54490 int idx = pCur->aiIdx[pCur->iPage];
54491 rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
54492 if( rc ){
 
54493 return rc;
54494 }
54495 rc = moveToRightmost(pCur);
54496 }else{
54497 while( pCur->aiIdx[pCur->iPage]==0 ){
@@ -63508,16 +63542,18 @@
63508 sqlite3VdbeMemSetDouble(&pCtx->s, rVal);
63509 }
63510 SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
63511 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63512 pCtx->isError = SQLITE_ERROR;
 
63513 sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
63514 }
63515 #ifndef SQLITE_OMIT_UTF16
63516 SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
63517 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63518 pCtx->isError = SQLITE_ERROR;
 
63519 sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
63520 }
63521 #endif
63522 SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
63523 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
@@ -63577,10 +63613,11 @@
63577 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63578 sqlite3VdbeMemSetZeroBlob(&pCtx->s, n);
63579 }
63580 SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
63581 pCtx->isError = errCode;
 
63582 if( pCtx->s.flags & MEM_Null ){
63583 sqlite3VdbeMemSetStr(&pCtx->s, sqlite3ErrStr(errCode), -1,
63584 SQLITE_UTF8, SQLITE_STATIC);
63585 }
63586 }
@@ -63587,19 +63624,21 @@
63587
63588 /* Force an SQLITE_TOOBIG error. */
63589 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
63590 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63591 pCtx->isError = SQLITE_TOOBIG;
 
63592 sqlite3VdbeMemSetStr(&pCtx->s, "string or blob too big", -1,
63593 SQLITE_UTF8, SQLITE_STATIC);
63594 }
63595
63596 /* An SQLITE_NOMEM error. */
63597 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
63598 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63599 sqlite3VdbeMemSetNull(&pCtx->s);
63600 pCtx->isError = SQLITE_NOMEM;
 
63601 pCtx->s.db->mallocFailed = 1;
63602 }
63603
63604 /*
63605 ** This function is called after a transaction has been committed. It
@@ -63918,10 +63957,14 @@
63918 if( !pAuxData ) goto failed;
63919 pAuxData->iOp = pCtx->iOp;
63920 pAuxData->iArg = iArg;
63921 pAuxData->pNext = pVdbe->pAuxData;
63922 pVdbe->pAuxData = pAuxData;
 
 
 
 
63923 }else if( pAuxData->xDelete ){
63924 pAuxData->xDelete(pAuxData->pAux);
63925 }
63926
63927 pAuxData->pAux = pAux;
@@ -64586,13 +64629,13 @@
64586 /*
64587 ** Return the value of a status counter for a prepared statement
64588 */
64589 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
64590 Vdbe *pVdbe = (Vdbe*)pStmt;
64591 int v = pVdbe->aCounter[op-1];
64592 if( resetFlag ) pVdbe->aCounter[op-1] = 0;
64593 return v;
64594 }
64595
64596 /************** End of vdbeapi.c *********************************************/
64597 /************** Begin file vdbetrace.c ***************************************/
64598 /*
@@ -65995,11 +66038,11 @@
65995 CHECK_FOR_INTERRUPT;
65996 sqlite3VdbeIOTraceSql(p);
65997 #ifndef SQLITE_OMIT_PROGRESS_CALLBACK
65998 if( db->xProgress ){
65999 assert( 0 < db->nProgressOps );
66000 nProgressLimit = (unsigned)p->aCounter[SQLITE_STMTSTATUS_VM_STEP-1];
66001 if( nProgressLimit==0 ){
66002 nProgressLimit = db->nProgressOps;
66003 }else{
66004 nProgressLimit %= (unsigned)db->nProgressOps;
66005 }
@@ -66874,11 +66917,11 @@
66874 ** the already allocated buffer instead of allocating a new one.
66875 */
66876 sqlite3VdbeMemMove(&u.ai.ctx.s, pOut);
66877 MemSetTypeFlag(&u.ai.ctx.s, MEM_Null);
66878
66879 u.ai.ctx.isError = 0;
66880 if( u.ai.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
66881 assert( pOp>aOp );
66882 assert( pOp[-1].p4type==P4_COLLSEQ );
66883 assert( pOp[-1].opcode==OP_CollSeq );
66884 u.ai.ctx.pColl = pOp[-1].p4.pColl;
@@ -66885,15 +66928,10 @@
66885 }
66886 db->lastRowid = lastRowid;
66887 (*u.ai.ctx.pFunc->xFunc)(&u.ai.ctx, u.ai.n, u.ai.apVal); /* IMP: R-24505-23230 */
66888 lastRowid = db->lastRowid;
66889
66890 /* If any auxiliary data functions have been called by this user function,
66891 ** immediately call the destructor for any non-static values.
66892 */
66893 sqlite3VdbeDeleteAuxData(p, pc, pOp->p1);
66894
66895 if( db->mallocFailed ){
66896 /* Even though a malloc() has failed, the implementation of the
66897 ** user function may have called an sqlite3_result_XXX() function
66898 ** to return a value. The following call releases any resources
66899 ** associated with such a value.
@@ -66901,13 +66939,16 @@
66901 sqlite3VdbeMemRelease(&u.ai.ctx.s);
66902 goto no_mem;
66903 }
66904
66905 /* If the function returned an error, throw an exception */
66906 if( u.ai.ctx.isError ){
66907 sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.ai.ctx.s));
66908 rc = u.ai.ctx.isError;
 
 
 
66909 }
66910
66911 /* Copy the result of the function into register P3 */
66912 sqlite3VdbeChangeEncoding(&u.ai.ctx.s, encoding);
66913 sqlite3VdbeMemMove(pOut, &u.ai.ctx.s);
@@ -67279,16 +67320,16 @@
67279 }else{
67280 /* SQLITE_NULLEQ is clear and at least one operand is NULL,
67281 ** then the result is always NULL.
67282 ** The jump is taken if the SQLITE_JUMPIFNULL bit is set.
67283 */
67284 if( pOp->p5 & SQLITE_STOREP2 ){
 
 
67285 pOut = &aMem[pOp->p2];
67286 MemSetTypeFlag(pOut, MEM_Null);
67287 REGISTER_TRACE(pOp->p2, pOut);
67288 }else if( pOp->p5 & SQLITE_JUMPIFNULL ){
67289 pc = pOp->p2-1;
67290 }
67291 break;
67292 }
67293 }else{
67294 /* Neither operand is NULL. Do a comparison. */
@@ -69931,11 +69972,11 @@
69931 case OP_Sort: { /* jump */
69932 #ifdef SQLITE_TEST
69933 sqlite3_sort_count++;
69934 sqlite3_search_count--;
69935 #endif
69936 p->aCounter[SQLITE_STMTSTATUS_SORT-1]++;
69937 /* Fall through into OP_Rewind */
69938 }
69939 /* Opcode: Rewind P1 P2 * * *
69940 **
69941 ** The next use of the Rowid or Column or Next instruction for P1
@@ -70014,21 +70055,21 @@
70014 VdbeCursor *pC;
70015 int res;
70016 #endif /* local variables moved into u.br */
70017
70018 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
70019 assert( pOp->p5<=ArraySize(p->aCounter) );
70020 u.br.pC = p->apCsr[pOp->p1];
70021 if( u.br.pC==0 ){
70022 break; /* See ticket #2273 */
70023 }
70024 assert( u.br.pC->isSorter==(pOp->opcode==OP_SorterNext) );
70025 if( isSorter(u.br.pC) ){
70026 assert( pOp->opcode==OP_SorterNext );
70027 rc = sqlite3VdbeSorterNext(db, u.br.pC, &u.br.res);
70028 }else{
70029 u.br.res = 1;
70030 assert( u.br.pC->deferredMoveto==0 );
70031 assert( u.br.pC->pCursor );
70032 assert( pOp->opcode!=OP_Next || pOp->p4.xAdvance==sqlite3BtreeNext );
70033 assert( pOp->opcode!=OP_Prev || pOp->p4.xAdvance==sqlite3BtreePrevious );
70034 rc = pOp->p4.xAdvance(u.br.pC->pCursor, &u.br.res);
@@ -70035,11 +70076,11 @@
70035 }
70036 u.br.pC->nullRow = (u8)u.br.res;
70037 u.br.pC->cacheStatus = CACHE_STALE;
70038 if( u.br.res==0 ){
70039 pc = pOp->p2 - 1;
70040 if( pOp->p5 ) p->aCounter[pOp->p5-1]++;
70041 #ifdef SQLITE_TEST
70042 sqlite3_search_count++;
70043 #endif
70044 }
70045 u.br.pC->rowidIsValid = 0;
@@ -71792,11 +71833,11 @@
71792 ** release the mutexes on btrees that were acquired at the
71793 ** top. */
71794 vdbe_return:
71795 db->lastRowid = lastRowid;
71796 testcase( nVmStep>0 );
71797 p->aCounter[SQLITE_STMTSTATUS_VM_STEP-1] += (int)nVmStep;
71798 sqlite3VdbeLeave(p);
71799 return rc;
71800
71801 /* Jump to here if a string or blob larger than SQLITE_MAX_LENGTH
71802 ** is encountered.
@@ -76717,10 +76758,11 @@
76717 break;
76718 }
76719 case TK_UMINUS: {
76720 int v;
76721 if( sqlite3ExprIsInteger(p->pLeft, &v) ){
 
76722 *pValue = -v;
76723 rc = 1;
76724 }
76725 break;
76726 }
@@ -109074,11 +109116,13 @@
109074 rLogSize = estLog(whereCost(pProbe->aiRowEst[0]));
109075 for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
109076 int nIn = 0;
109077 if( pTerm->prereqRight & pNew->maskSelf ) continue;
109078 #ifdef SQLITE_ENABLE_STAT3
109079 if( (pTerm->wtFlags & TERM_VNULL)!=0 && pSrc->pTab->aCol[iCol].notNull ){
 
 
109080 continue; /* skip IS NOT NULL constraints on a NOT NULL column */
109081 }
109082 #endif
109083 pNew->wsFlags = saved_wsFlags;
109084 pNew->u.btree.nEq = saved_nEq;
@@ -109217,10 +109261,11 @@
109217 static Bitmask columnsInIndex(Index *pIdx){
109218 Bitmask m = 0;
109219 int j;
109220 for(j=pIdx->nColumn-1; j>=0; j--){
109221 int x = pIdx->aiColumn[j];
 
109222 testcase( x==BMS-1 );
109223 testcase( x==BMS-2 );
109224 if( x<BMS-1 ) m |= MASKBIT(x);
109225 }
109226 return m;
@@ -130932,11 +130977,11 @@
130932 while( 1 ){
130933
130934 /* The following line of code (and the "p++" below the while() loop) is
130935 ** normally all that is required to move pointer p to the desired
130936 ** position. The exception is if this node is being loaded from disk
130937 ** incrementally and pointer "p" now points to the first byte passed
130938 ** the populated part of pReader->aNode[].
130939 */
130940 while( *p | c ) c = *p++ & 0x80;
130941 assert( *p==0 );
130942
@@ -132319,12 +132364,12 @@
132319 fts3SegReaderFirstDocid(p, apSegment[i]);
132320 }
132321 fts3SegReaderSort(apSegment, nMerge, nMerge, xCmp);
132322 while( apSegment[0]->pOffsetList ){
132323 int j; /* Number of segments that share a docid */
132324 char *pList;
132325 int nList;
132326 int nByte;
132327 sqlite3_int64 iDocid = apSegment[0]->iDocid;
132328 fts3SegReaderNextDocid(p, apSegment[0], &pList, &nList);
132329 j = 1;
132330 while( j<nMerge
@@ -135393,10 +135438,11 @@
135393 return SQLITE_NOMEM;
135394 }
135395 pStr->z = zNew;
135396 pStr->nAlloc = nAlloc;
135397 }
 
135398
135399 /* Append the data to the string buffer. */
135400 memcpy(&pStr->z[pStr->n], zAppend, nAppend);
135401 pStr->n += nAppend;
135402 pStr->z[pStr->n] = '\0';
135403
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -656,11 +656,11 @@
656 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
657 ** [sqlite_version()] and [sqlite_source_id()].
658 */
659 #define SQLITE_VERSION "3.8.0"
660 #define SQLITE_VERSION_NUMBER 3008000
661 #define SQLITE_SOURCE_ID "2013-08-20 03:13:51 7f72fc4f47445a2c01910b268335873de9f75059"
662
663 /*
664 ** CAPI3REF: Run-Time Library Version Numbers
665 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
666 **
@@ -13486,14 +13486,15 @@
13486 struct sqlite3_context {
13487 FuncDef *pFunc; /* Pointer to function information. MUST BE FIRST */
13488 Mem s; /* The return value is stored here */
13489 Mem *pMem; /* Memory cell used to store aggregate context */
13490 CollSeq *pColl; /* Collating sequence */
13491 Vdbe *pVdbe; /* The VM that owns this context */
 
13492 int iOp; /* Instruction number of OP_Function */
13493 int isError; /* Error code returned by the function. */
13494 u8 skipFlag; /* Skip skip accumulator loading if true */
13495 u8 fErrorOrAux; /* isError!=0 or pVdbe->pAuxData modified */
13496 };
13497
13498 /*
13499 ** An Explain object accumulates indented output which is helpful
13500 ** in describing recursive data structures.
@@ -13565,11 +13566,11 @@
13566 bft doingRerun:1; /* True if rerunning after an auto-reprepare */
13567 int nChange; /* Number of db changes made since last reset */
13568 yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
13569 yDbMask lockMask; /* Subset of btreeMask that requires a lock */
13570 int iStatement; /* Statement number (or 0 if has not opened stmt) */
13571 u32 aCounter[5]; /* Counters used by sqlite3_stmt_status() */
13572 #ifndef SQLITE_OMIT_TRACE
13573 i64 startTime; /* Time when query started - used for profiling */
13574 #endif
13575 i64 nFkConstraint; /* Number of imm. FK constraints this VM */
13576 i64 nStmtDefCons; /* Number of def. constraints when stmt started */
@@ -37447,10 +37448,11 @@
37448 }
37449
37450 if( pCache->nPage>=pCache->nHash && pcache1ResizeHash(pCache) ){
37451 goto fetch_out;
37452 }
37453 assert( pCache->nHash>0 && pCache->apHash );
37454
37455 /* Step 4. Try to recycle a page. */
37456 if( pCache->bPurgeable && pGroup->pLruTail && (
37457 (pCache->nPage+1>=pCache->nMax)
37458 || pGroup->nCurrentPage>=pGroup->nMaxPage
@@ -49181,18 +49183,23 @@
49183 };
49184
49185 /*
49186 ** Potential values for BtCursor.eState.
49187 **
 
 
 
49188 ** CURSOR_INVALID:
49189 ** Cursor does not point to a valid entry. This can happen (for example)
49190 ** because the table is empty or because BtreeCursorFirst() has not been
49191 ** called.
49192 **
49193 ** CURSOR_VALID:
49194 ** Cursor points to a valid entry. getPayload() etc. may be called.
49195 **
49196 ** CURSOR_SKIPNEXT:
49197 ** Cursor is valid except that the Cursor.skipNext field is non-zero
49198 ** indicating that the next sqlite3BtreeNext() or sqlite3BtreePrevious()
49199 ** operation should be a no-op.
49200 **
49201 ** CURSOR_REQUIRESEEK:
49202 ** The table that this cursor was opened on still exists, but has been
49203 ** modified since the cursor was last used. The cursor position is saved
49204 ** in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in
49205 ** this state, restoreCursorPosition() can be called to attempt to
@@ -49205,12 +49212,13 @@
49212 ** Do nothing else with this cursor. Any attempt to use the cursor
49213 ** should return the error code stored in BtCursor.skip
49214 */
49215 #define CURSOR_INVALID 0
49216 #define CURSOR_VALID 1
49217 #define CURSOR_SKIPNEXT 2
49218 #define CURSOR_REQUIRESEEK 3
49219 #define CURSOR_FAULT 4
49220
49221 /*
49222 ** The database page the PENDING_BYTE occupies. This page is never used.
49223 */
49224 # define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)
@@ -50320,10 +50328,13 @@
50328 rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext);
50329 if( rc==SQLITE_OK ){
50330 sqlite3_free(pCur->pKey);
50331 pCur->pKey = 0;
50332 assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
50333 if( pCur->skipNext && pCur->eState==CURSOR_VALID ){
50334 pCur->eState = CURSOR_SKIPNEXT;
50335 }
50336 }
50337 return rc;
50338 }
50339
50340 #define restoreCursorPosition(p) \
@@ -50345,11 +50356,11 @@
50356 rc = restoreCursorPosition(pCur);
50357 if( rc ){
50358 *pHasMoved = 1;
50359 return rc;
50360 }
50361 if( pCur->eState!=CURSOR_VALID || NEVER(pCur->skipNext!=0) ){
50362 *pHasMoved = 1;
50363 }else{
50364 *pHasMoved = 0;
50365 }
50366 return SQLITE_OK;
@@ -54392,25 +54403,33 @@
54403 int rc;
54404 int idx;
54405 MemPage *pPage;
54406
54407 assert( cursorHoldsMutex(pCur) );
 
 
 
 
54408 assert( pRes!=0 );
54409 assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
54410 if( pCur->eState!=CURSOR_VALID ){
54411 rc = restoreCursorPosition(pCur);
54412 if( rc!=SQLITE_OK ){
54413 *pRes = 0;
54414 return rc;
54415 }
54416 if( CURSOR_INVALID==pCur->eState ){
54417 *pRes = 1;
54418 return SQLITE_OK;
54419 }
54420 if( pCur->skipNext ){
54421 assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT );
54422 pCur->eState = CURSOR_VALID;
54423 if( pCur->skipNext>0 ){
54424 pCur->skipNext = 0;
54425 *pRes = 0;
54426 return SQLITE_OK;
54427 }
54428 pCur->skipNext = 0;
54429 }
54430 }
54431
54432 pPage = pCur->apPage[pCur->iPage];
54433 idx = ++pCur->aiIdx[pCur->iPage];
54434 assert( pPage->isInit );
54435
@@ -54424,11 +54443,14 @@
54443 pCur->info.nSize = 0;
54444 pCur->validNKey = 0;
54445 if( idx>=pPage->nCell ){
54446 if( !pPage->leaf ){
54447 rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
54448 if( rc ){
54449 *pRes = 0;
54450 return rc;
54451 }
54452 rc = moveToLeftmost(pCur);
54453 *pRes = 0;
54454 return rc;
54455 }
54456 do{
@@ -54466,32 +54488,44 @@
54488 SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
54489 int rc;
54490 MemPage *pPage;
54491
54492 assert( cursorHoldsMutex(pCur) );
54493 assert( pRes!=0 );
54494 assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
 
 
54495 pCur->atLast = 0;
54496 if( pCur->eState!=CURSOR_VALID ){
54497 if( ALWAYS(pCur->eState>=CURSOR_REQUIRESEEK) ){
54498 rc = btreeRestoreCursorPosition(pCur);
54499 if( rc!=SQLITE_OK ){
54500 *pRes = 0;
54501 return rc;
54502 }
54503 }
54504 if( CURSOR_INVALID==pCur->eState ){
54505 *pRes = 1;
54506 return SQLITE_OK;
54507 }
54508 if( pCur->skipNext ){
54509 assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT );
54510 pCur->eState = CURSOR_VALID;
54511 if( pCur->skipNext<0 ){
54512 pCur->skipNext = 0;
54513 *pRes = 0;
54514 return SQLITE_OK;
54515 }
54516 pCur->skipNext = 0;
54517 }
54518 }
54519
54520 pPage = pCur->apPage[pCur->iPage];
54521 assert( pPage->isInit );
54522 if( !pPage->leaf ){
54523 int idx = pCur->aiIdx[pCur->iPage];
54524 rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
54525 if( rc ){
54526 *pRes = 0;
54527 return rc;
54528 }
54529 rc = moveToRightmost(pCur);
54530 }else{
54531 while( pCur->aiIdx[pCur->iPage]==0 ){
@@ -63508,16 +63542,18 @@
63542 sqlite3VdbeMemSetDouble(&pCtx->s, rVal);
63543 }
63544 SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
63545 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63546 pCtx->isError = SQLITE_ERROR;
63547 pCtx->fErrorOrAux = 1;
63548 sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
63549 }
63550 #ifndef SQLITE_OMIT_UTF16
63551 SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
63552 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63553 pCtx->isError = SQLITE_ERROR;
63554 pCtx->fErrorOrAux = 1;
63555 sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
63556 }
63557 #endif
63558 SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
63559 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
@@ -63577,10 +63613,11 @@
63613 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63614 sqlite3VdbeMemSetZeroBlob(&pCtx->s, n);
63615 }
63616 SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
63617 pCtx->isError = errCode;
63618 pCtx->fErrorOrAux = 1;
63619 if( pCtx->s.flags & MEM_Null ){
63620 sqlite3VdbeMemSetStr(&pCtx->s, sqlite3ErrStr(errCode), -1,
63621 SQLITE_UTF8, SQLITE_STATIC);
63622 }
63623 }
@@ -63587,19 +63624,21 @@
63624
63625 /* Force an SQLITE_TOOBIG error. */
63626 SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
63627 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63628 pCtx->isError = SQLITE_TOOBIG;
63629 pCtx->fErrorOrAux = 1;
63630 sqlite3VdbeMemSetStr(&pCtx->s, "string or blob too big", -1,
63631 SQLITE_UTF8, SQLITE_STATIC);
63632 }
63633
63634 /* An SQLITE_NOMEM error. */
63635 SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
63636 assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
63637 sqlite3VdbeMemSetNull(&pCtx->s);
63638 pCtx->isError = SQLITE_NOMEM;
63639 pCtx->fErrorOrAux = 1;
63640 pCtx->s.db->mallocFailed = 1;
63641 }
63642
63643 /*
63644 ** This function is called after a transaction has been committed. It
@@ -63918,10 +63957,14 @@
63957 if( !pAuxData ) goto failed;
63958 pAuxData->iOp = pCtx->iOp;
63959 pAuxData->iArg = iArg;
63960 pAuxData->pNext = pVdbe->pAuxData;
63961 pVdbe->pAuxData = pAuxData;
63962 if( pCtx->fErrorOrAux==0 ){
63963 pCtx->isError = 0;
63964 pCtx->fErrorOrAux = 1;
63965 }
63966 }else if( pAuxData->xDelete ){
63967 pAuxData->xDelete(pAuxData->pAux);
63968 }
63969
63970 pAuxData->pAux = pAux;
@@ -64586,13 +64629,13 @@
64629 /*
64630 ** Return the value of a status counter for a prepared statement
64631 */
64632 SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
64633 Vdbe *pVdbe = (Vdbe*)pStmt;
64634 u32 v = pVdbe->aCounter[op];
64635 if( resetFlag ) pVdbe->aCounter[op] = 0;
64636 return (int)v;
64637 }
64638
64639 /************** End of vdbeapi.c *********************************************/
64640 /************** Begin file vdbetrace.c ***************************************/
64641 /*
@@ -65995,11 +66038,11 @@
66038 CHECK_FOR_INTERRUPT;
66039 sqlite3VdbeIOTraceSql(p);
66040 #ifndef SQLITE_OMIT_PROGRESS_CALLBACK
66041 if( db->xProgress ){
66042 assert( 0 < db->nProgressOps );
66043 nProgressLimit = (unsigned)p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
66044 if( nProgressLimit==0 ){
66045 nProgressLimit = db->nProgressOps;
66046 }else{
66047 nProgressLimit %= (unsigned)db->nProgressOps;
66048 }
@@ -66874,11 +66917,11 @@
66917 ** the already allocated buffer instead of allocating a new one.
66918 */
66919 sqlite3VdbeMemMove(&u.ai.ctx.s, pOut);
66920 MemSetTypeFlag(&u.ai.ctx.s, MEM_Null);
66921
66922 u.ai.ctx.fErrorOrAux = 0;
66923 if( u.ai.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
66924 assert( pOp>aOp );
66925 assert( pOp[-1].p4type==P4_COLLSEQ );
66926 assert( pOp[-1].opcode==OP_CollSeq );
66927 u.ai.ctx.pColl = pOp[-1].p4.pColl;
@@ -66885,15 +66928,10 @@
66928 }
66929 db->lastRowid = lastRowid;
66930 (*u.ai.ctx.pFunc->xFunc)(&u.ai.ctx, u.ai.n, u.ai.apVal); /* IMP: R-24505-23230 */
66931 lastRowid = db->lastRowid;
66932
 
 
 
 
 
66933 if( db->mallocFailed ){
66934 /* Even though a malloc() has failed, the implementation of the
66935 ** user function may have called an sqlite3_result_XXX() function
66936 ** to return a value. The following call releases any resources
66937 ** associated with such a value.
@@ -66901,13 +66939,16 @@
66939 sqlite3VdbeMemRelease(&u.ai.ctx.s);
66940 goto no_mem;
66941 }
66942
66943 /* If the function returned an error, throw an exception */
66944 if( u.ai.ctx.fErrorOrAux ){
66945 if( u.ai.ctx.isError ){
66946 sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.ai.ctx.s));
66947 rc = u.ai.ctx.isError;
66948 }
66949 sqlite3VdbeDeleteAuxData(p, pc, pOp->p1);
66950 }
66951
66952 /* Copy the result of the function into register P3 */
66953 sqlite3VdbeChangeEncoding(&u.ai.ctx.s, encoding);
66954 sqlite3VdbeMemMove(pOut, &u.ai.ctx.s);
@@ -67279,16 +67320,16 @@
67320 }else{
67321 /* SQLITE_NULLEQ is clear and at least one operand is NULL,
67322 ** then the result is always NULL.
67323 ** The jump is taken if the SQLITE_JUMPIFNULL bit is set.
67324 */
67325 if( pOp->p5 & SQLITE_JUMPIFNULL ){
67326 pc = pOp->p2-1;
67327 }else if( pOp->p5 & SQLITE_STOREP2 ){
67328 pOut = &aMem[pOp->p2];
67329 MemSetTypeFlag(pOut, MEM_Null);
67330 REGISTER_TRACE(pOp->p2, pOut);
 
 
67331 }
67332 break;
67333 }
67334 }else{
67335 /* Neither operand is NULL. Do a comparison. */
@@ -69931,11 +69972,11 @@
69972 case OP_Sort: { /* jump */
69973 #ifdef SQLITE_TEST
69974 sqlite3_sort_count++;
69975 sqlite3_search_count--;
69976 #endif
69977 p->aCounter[SQLITE_STMTSTATUS_SORT]++;
69978 /* Fall through into OP_Rewind */
69979 }
69980 /* Opcode: Rewind P1 P2 * * *
69981 **
69982 ** The next use of the Rowid or Column or Next instruction for P1
@@ -70014,21 +70055,21 @@
70055 VdbeCursor *pC;
70056 int res;
70057 #endif /* local variables moved into u.br */
70058
70059 assert( pOp->p1>=0 && pOp->p1<p->nCursor );
70060 assert( pOp->p5<ArraySize(p->aCounter) );
70061 u.br.pC = p->apCsr[pOp->p1];
70062 if( u.br.pC==0 ){
70063 break; /* See ticket #2273 */
70064 }
70065 assert( u.br.pC->isSorter==(pOp->opcode==OP_SorterNext) );
70066 if( isSorter(u.br.pC) ){
70067 assert( pOp->opcode==OP_SorterNext );
70068 rc = sqlite3VdbeSorterNext(db, u.br.pC, &u.br.res);
70069 }else{
70070 /* u.br.res = 1; // Always initialized by the xAdvance() call */
70071 assert( u.br.pC->deferredMoveto==0 );
70072 assert( u.br.pC->pCursor );
70073 assert( pOp->opcode!=OP_Next || pOp->p4.xAdvance==sqlite3BtreeNext );
70074 assert( pOp->opcode!=OP_Prev || pOp->p4.xAdvance==sqlite3BtreePrevious );
70075 rc = pOp->p4.xAdvance(u.br.pC->pCursor, &u.br.res);
@@ -70035,11 +70076,11 @@
70076 }
70077 u.br.pC->nullRow = (u8)u.br.res;
70078 u.br.pC->cacheStatus = CACHE_STALE;
70079 if( u.br.res==0 ){
70080 pc = pOp->p2 - 1;
70081 p->aCounter[pOp->p5]++;
70082 #ifdef SQLITE_TEST
70083 sqlite3_search_count++;
70084 #endif
70085 }
70086 u.br.pC->rowidIsValid = 0;
@@ -71792,11 +71833,11 @@
71833 ** release the mutexes on btrees that were acquired at the
71834 ** top. */
71835 vdbe_return:
71836 db->lastRowid = lastRowid;
71837 testcase( nVmStep>0 );
71838 p->aCounter[SQLITE_STMTSTATUS_VM_STEP] += (int)nVmStep;
71839 sqlite3VdbeLeave(p);
71840 return rc;
71841
71842 /* Jump to here if a string or blob larger than SQLITE_MAX_LENGTH
71843 ** is encountered.
@@ -76717,10 +76758,11 @@
76758 break;
76759 }
76760 case TK_UMINUS: {
76761 int v;
76762 if( sqlite3ExprIsInteger(p->pLeft, &v) ){
76763 assert( v!=-2147483648 );
76764 *pValue = -v;
76765 rc = 1;
76766 }
76767 break;
76768 }
@@ -109074,11 +109116,13 @@
109116 rLogSize = estLog(whereCost(pProbe->aiRowEst[0]));
109117 for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
109118 int nIn = 0;
109119 if( pTerm->prereqRight & pNew->maskSelf ) continue;
109120 #ifdef SQLITE_ENABLE_STAT3
109121 if( (pTerm->wtFlags & TERM_VNULL)!=0
109122 && (iCol<0 || pSrc->pTab->aCol[iCol].notNull)
109123 ){
109124 continue; /* skip IS NOT NULL constraints on a NOT NULL column */
109125 }
109126 #endif
109127 pNew->wsFlags = saved_wsFlags;
109128 pNew->u.btree.nEq = saved_nEq;
@@ -109217,10 +109261,11 @@
109261 static Bitmask columnsInIndex(Index *pIdx){
109262 Bitmask m = 0;
109263 int j;
109264 for(j=pIdx->nColumn-1; j>=0; j--){
109265 int x = pIdx->aiColumn[j];
109266 assert( x>=0 );
109267 testcase( x==BMS-1 );
109268 testcase( x==BMS-2 );
109269 if( x<BMS-1 ) m |= MASKBIT(x);
109270 }
109271 return m;
@@ -130932,11 +130977,11 @@
130977 while( 1 ){
130978
130979 /* The following line of code (and the "p++" below the while() loop) is
130980 ** normally all that is required to move pointer p to the desired
130981 ** position. The exception is if this node is being loaded from disk
130982 ** incrementally and pointer "p" now points to the first byte past
130983 ** the populated part of pReader->aNode[].
130984 */
130985 while( *p | c ) c = *p++ & 0x80;
130986 assert( *p==0 );
130987
@@ -132319,12 +132364,12 @@
132364 fts3SegReaderFirstDocid(p, apSegment[i]);
132365 }
132366 fts3SegReaderSort(apSegment, nMerge, nMerge, xCmp);
132367 while( apSegment[0]->pOffsetList ){
132368 int j; /* Number of segments that share a docid */
132369 char *pList = 0;
132370 int nList = 0;
132371 int nByte;
132372 sqlite3_int64 iDocid = apSegment[0]->iDocid;
132373 fts3SegReaderNextDocid(p, apSegment[0], &pList, &nList);
132374 j = 1;
132375 while( j<nMerge
@@ -135393,10 +135438,11 @@
135438 return SQLITE_NOMEM;
135439 }
135440 pStr->z = zNew;
135441 pStr->nAlloc = nAlloc;
135442 }
135443 assert( pStr->z!=0 && (pStr->nAlloc >= pStr->n+nAppend+1) );
135444
135445 /* Append the data to the string buffer. */
135446 memcpy(&pStr->z[pStr->n], zAppend, nAppend);
135447 pStr->n += nAppend;
135448 pStr->z[pStr->n] = '\0';
135449
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.8.0"
111111
#define SQLITE_VERSION_NUMBER 3008000
112
-#define SQLITE_SOURCE_ID "2013-08-19 11:15:48 a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a"
112
+#define SQLITE_SOURCE_ID "2013-08-20 03:13:51 7f72fc4f47445a2c01910b268335873de9f75059"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.0"
111 #define SQLITE_VERSION_NUMBER 3008000
112 #define SQLITE_SOURCE_ID "2013-08-19 11:15:48 a0d9ca4f07f1dc3a189864f8ed9cdb0b1d791b1a"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.0"
111 #define SQLITE_VERSION_NUMBER 3008000
112 #define SQLITE_SOURCE_ID "2013-08-20 03:13:51 7f72fc4f47445a2c01910b268335873de9f75059"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118

Keyboard Shortcuts

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