Fossil SCM

Update the internal SQLite to the latest 3.7.4 pre-release snapshot.

drh 2010-12-07 13:31 trunk
Commit 0018d724b327ae1f4a648ce7d0772cd11ba4015f
2 files changed +36 -17 +3 -2
+36 -17
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -650,11 +650,11 @@
650650
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
651651
** [sqlite_version()] and [sqlite_source_id()].
652652
*/
653653
#define SQLITE_VERSION "3.7.4"
654654
#define SQLITE_VERSION_NUMBER 3007004
655
-#define SQLITE_SOURCE_ID "2010-12-02 11:24:58 a94b9a395e0be9549d8c28e2b86b995c73c7b671"
655
+#define SQLITE_SOURCE_ID "2010-12-06 21:09:59 fabcb6b95e1d4059d1e6c6183f65846f6cbd5749"
656656
657657
/*
658658
** CAPI3REF: Run-Time Library Version Numbers
659659
** KEYWORDS: sqlite3_version, sqlite3_sourceid
660660
**
@@ -5381,11 +5381,12 @@
53815381
** the nominated column.)^ ^If the new row is not present in the table, or if
53825382
** it does not contain a blob or text value, or if another error occurs, an
53835383
** SQLite error code is returned and the blob handle is considered aborted.
53845384
** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
53855385
** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
5386
-** SQLITE_ABORT.
5386
+** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
5387
+** always returns zero.
53875388
**
53885389
** ^This function sets the database handle error code and message.
53895390
*/
53905391
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
53915392
@@ -9071,10 +9072,11 @@
90719072
#define SQLITE_ColumnCache 0x02 /* Disable the column cache */
90729073
#define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */
90739074
#define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */
90749075
#define SQLITE_IndexCover 0x10 /* Disable index covering table */
90759076
#define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */
9077
+#define SQLITE_FactorOutConst 0x40 /* Disable factoring out constants */
90769078
#define SQLITE_OptMask 0xff /* Mask of all disablable opts */
90779079
90789080
/*
90799081
** Possible values for the sqlite.magic field.
90809082
** The numbers are obtained at random and have no special meaning, other
@@ -46906,21 +46908,17 @@
4690646908
4690746909
/* True if opening an ephemeral, temporary database */
4690846910
const int isTempDb = zFilename==0 || zFilename[0]==0;
4690946911
4691046912
/* Set the variable isMemdb to true for an in-memory database, or
46911
- ** false for a file-based database. This symbol is only required if
46912
- ** either of the shared-data or autovacuum features are compiled
46913
- ** into the library.
46913
+ ** false for a file-based database.
4691446914
*/
46915
-#if !defined(SQLITE_OMIT_SHARED_CACHE) || !defined(SQLITE_OMIT_AUTOVACUUM)
46916
- #ifdef SQLITE_OMIT_MEMORYDB
46917
- const int isMemdb = 0;
46918
- #else
46919
- const int isMemdb = (zFilename && strcmp(zFilename, ":memory:")==0)
46920
- || (isTempDb && sqlite3TempInMemory(db));
46921
- #endif
46915
+#ifdef SQLITE_OMIT_MEMORYDB
46916
+ const int isMemdb = 0;
46917
+#else
46918
+ const int isMemdb = (zFilename && strcmp(zFilename, ":memory:")==0)
46919
+ || (isTempDb && sqlite3TempInMemory(db));
4692246920
#endif
4692346921
4692446922
assert( db!=0 );
4692546923
assert( sqlite3_mutex_held(db->mutex) );
4692646924
assert( (flags&0xff)==flags ); /* flags fit in 8 bits */
@@ -61775,11 +61773,10 @@
6177561773
** without data loss, then jump immediately to P2, or if P2==0
6177661774
** raise an SQLITE_MISMATCH exception.
6177761775
*/
6177861776
case OP_MustBeInt: { /* jump, in1 */
6177961777
pIn1 = &aMem[pOp->p1];
61780
- memAboutToChange(p, pIn1);
6178161778
applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
6178261779
if( (pIn1->flags & MEM_Int)==0 ){
6178361780
if( pOp->p2==0 ){
6178461781
rc = SQLITE_MISMATCH;
6178561782
goto abort_due_to_error;
@@ -66754,11 +66751,11 @@
6675466751
** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
6675566752
** so no mutex is required for access.
6675666753
*/
6675766754
SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
6675866755
Incrblob *p = (Incrblob *)pBlob;
66759
- return p ? p->nByte : 0;
66756
+ return (p && p->pStmt) ? p->nByte : 0;
6676066757
}
6676166758
6676266759
/*
6676366760
** Move an existing blob handle to point to a different row of the same
6676466761
** database table.
@@ -66792,10 +66789,11 @@
6679266789
}
6679366790
assert( rc!=SQLITE_SCHEMA );
6679466791
}
6679566792
6679666793
rc = sqlite3ApiExit(db, rc);
66794
+ assert( rc==SQLITE_OK || p->pStmt==0 );
6679766795
sqlite3_mutex_leave(db->mutex);
6679866796
return rc;
6679966797
}
6680066798
6680166799
#endif /* #ifndef SQLITE_OMIT_INCRBLOB */
@@ -70297,10 +70295,11 @@
7029770295
7029870296
assert( !isRowid );
7029970297
sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
7030070298
dest.affinity = (u8)affinity;
7030170299
assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
70300
+ pExpr->x.pSelect->iLimit = 0;
7030270301
if( sqlite3Select(pParse, pExpr->x.pSelect, &dest) ){
7030370302
return 0;
7030470303
}
7030570304
pEList = pExpr->x.pSelect->pEList;
7030670305
if( ALWAYS(pEList!=0 && pEList->nExpr>0) ){
@@ -70397,10 +70396,11 @@
7039770396
VdbeComment((v, "Init EXISTS result"));
7039870397
}
7039970398
sqlite3ExprDelete(pParse->db, pSel->pLimit);
7040070399
pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0,
7040170400
&sqlite3IntTokens[1]);
70401
+ pSel->iLimit = 0;
7040270402
if( sqlite3Select(pParse, pSel, &dest) ){
7040370403
return 0;
7040470404
}
7040570405
rReg = dest.iParm;
7040670406
ExprSetIrreducible(pExpr);
@@ -71680,13 +71680,26 @@
7168071680
7168171681
/*
7168271682
** Preevaluate constant subexpressions within pExpr and store the
7168371683
** results in registers. Modify pExpr so that the constant subexpresions
7168471684
** are TK_REGISTER opcodes that refer to the precomputed values.
71685
+**
71686
+** This routine is a no-op if the jump to the cookie-check code has
71687
+** already occur. Since the cookie-check jump is generated prior to
71688
+** any other serious processing, this check ensures that there is no
71689
+** way to accidently bypass the constant initializations.
71690
+**
71691
+** This routine is also a no-op if the SQLITE_FactorOutConst optimization
71692
+** is disabled via the sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS)
71693
+** interface. This allows test logic to verify that the same answer is
71694
+** obtained for queries regardless of whether or not constants are
71695
+** precomputed into registers or if they are inserted in-line.
7168571696
*/
7168671697
SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse *pParse, Expr *pExpr){
7168771698
Walker w;
71699
+ if( pParse->cookieGoto ) return;
71700
+ if( (pParse->db->flags & SQLITE_FactorOutConst)!=0 ) return;
7168871701
w.xExprCallback = evalConstExpr;
7168971702
w.xSelectCallback = 0;
7169071703
w.pParse = pParse;
7169171704
sqlite3WalkExpr(&w, pExpr);
7169271705
}
@@ -109240,11 +109253,11 @@
109240109253
** table, then there are always 20 bytes of zeroed padding following the
109241109254
** nNode bytes of content (see sqlite3Fts3ReadBlock() for details).
109242109255
*/
109243109256
zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
109244109257
zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
109245
- if( zCsr>=zEnd ){
109258
+ if( zCsr>zEnd ){
109246109259
return SQLITE_CORRUPT;
109247109260
}
109248109261
109249109262
while( zCsr<zEnd && (piFirst || piLast) ){
109250109263
int cmp; /* memcmp() result */
@@ -110871,12 +110884,17 @@
110871110884
}
110872110885
}
110873110886
}
110874110887
}
110875110888
110876
- *paOut = aRet;
110877
- *pnOut = nRet;
110889
+ if( rc==SQLITE_OK ){
110890
+ *paOut = aRet;
110891
+ *pnOut = nRet;
110892
+ }else{
110893
+ assert( *paOut==0 );
110894
+ sqlite3_free(aRet);
110895
+ }
110878110896
sqlite3_free(aExpr);
110879110897
fts3ExprFreeSegReaders(pExpr);
110880110898
110881110899
}else{
110882110900
char *aLeft;
@@ -110945,10 +110963,11 @@
110945110963
}
110946110964
sqlite3_free(aRight);
110947110965
}
110948110966
}
110949110967
110968
+ assert( rc==SQLITE_OK || *paOut==0 );
110950110969
return rc;
110951110970
}
110952110971
110953110972
/*
110954110973
** This function is called from within xNext() for each row visited by
110955110974
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -650,11 +650,11 @@
650 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
651 ** [sqlite_version()] and [sqlite_source_id()].
652 */
653 #define SQLITE_VERSION "3.7.4"
654 #define SQLITE_VERSION_NUMBER 3007004
655 #define SQLITE_SOURCE_ID "2010-12-02 11:24:58 a94b9a395e0be9549d8c28e2b86b995c73c7b671"
656
657 /*
658 ** CAPI3REF: Run-Time Library Version Numbers
659 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
660 **
@@ -5381,11 +5381,12 @@
5381 ** the nominated column.)^ ^If the new row is not present in the table, or if
5382 ** it does not contain a blob or text value, or if another error occurs, an
5383 ** SQLite error code is returned and the blob handle is considered aborted.
5384 ** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
5385 ** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
5386 ** SQLITE_ABORT.
 
5387 **
5388 ** ^This function sets the database handle error code and message.
5389 */
5390 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
5391
@@ -9071,10 +9072,11 @@
9071 #define SQLITE_ColumnCache 0x02 /* Disable the column cache */
9072 #define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */
9073 #define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */
9074 #define SQLITE_IndexCover 0x10 /* Disable index covering table */
9075 #define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */
 
9076 #define SQLITE_OptMask 0xff /* Mask of all disablable opts */
9077
9078 /*
9079 ** Possible values for the sqlite.magic field.
9080 ** The numbers are obtained at random and have no special meaning, other
@@ -46906,21 +46908,17 @@
46906
46907 /* True if opening an ephemeral, temporary database */
46908 const int isTempDb = zFilename==0 || zFilename[0]==0;
46909
46910 /* Set the variable isMemdb to true for an in-memory database, or
46911 ** false for a file-based database. This symbol is only required if
46912 ** either of the shared-data or autovacuum features are compiled
46913 ** into the library.
46914 */
46915 #if !defined(SQLITE_OMIT_SHARED_CACHE) || !defined(SQLITE_OMIT_AUTOVACUUM)
46916 #ifdef SQLITE_OMIT_MEMORYDB
46917 const int isMemdb = 0;
46918 #else
46919 const int isMemdb = (zFilename && strcmp(zFilename, ":memory:")==0)
46920 || (isTempDb && sqlite3TempInMemory(db));
46921 #endif
46922 #endif
46923
46924 assert( db!=0 );
46925 assert( sqlite3_mutex_held(db->mutex) );
46926 assert( (flags&0xff)==flags ); /* flags fit in 8 bits */
@@ -61775,11 +61773,10 @@
61775 ** without data loss, then jump immediately to P2, or if P2==0
61776 ** raise an SQLITE_MISMATCH exception.
61777 */
61778 case OP_MustBeInt: { /* jump, in1 */
61779 pIn1 = &aMem[pOp->p1];
61780 memAboutToChange(p, pIn1);
61781 applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
61782 if( (pIn1->flags & MEM_Int)==0 ){
61783 if( pOp->p2==0 ){
61784 rc = SQLITE_MISMATCH;
61785 goto abort_due_to_error;
@@ -66754,11 +66751,11 @@
66754 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
66755 ** so no mutex is required for access.
66756 */
66757 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
66758 Incrblob *p = (Incrblob *)pBlob;
66759 return p ? p->nByte : 0;
66760 }
66761
66762 /*
66763 ** Move an existing blob handle to point to a different row of the same
66764 ** database table.
@@ -66792,10 +66789,11 @@
66792 }
66793 assert( rc!=SQLITE_SCHEMA );
66794 }
66795
66796 rc = sqlite3ApiExit(db, rc);
 
66797 sqlite3_mutex_leave(db->mutex);
66798 return rc;
66799 }
66800
66801 #endif /* #ifndef SQLITE_OMIT_INCRBLOB */
@@ -70297,10 +70295,11 @@
70297
70298 assert( !isRowid );
70299 sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
70300 dest.affinity = (u8)affinity;
70301 assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
 
70302 if( sqlite3Select(pParse, pExpr->x.pSelect, &dest) ){
70303 return 0;
70304 }
70305 pEList = pExpr->x.pSelect->pEList;
70306 if( ALWAYS(pEList!=0 && pEList->nExpr>0) ){
@@ -70397,10 +70396,11 @@
70397 VdbeComment((v, "Init EXISTS result"));
70398 }
70399 sqlite3ExprDelete(pParse->db, pSel->pLimit);
70400 pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0,
70401 &sqlite3IntTokens[1]);
 
70402 if( sqlite3Select(pParse, pSel, &dest) ){
70403 return 0;
70404 }
70405 rReg = dest.iParm;
70406 ExprSetIrreducible(pExpr);
@@ -71680,13 +71680,26 @@
71680
71681 /*
71682 ** Preevaluate constant subexpressions within pExpr and store the
71683 ** results in registers. Modify pExpr so that the constant subexpresions
71684 ** are TK_REGISTER opcodes that refer to the precomputed values.
 
 
 
 
 
 
 
 
 
 
 
71685 */
71686 SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse *pParse, Expr *pExpr){
71687 Walker w;
 
 
71688 w.xExprCallback = evalConstExpr;
71689 w.xSelectCallback = 0;
71690 w.pParse = pParse;
71691 sqlite3WalkExpr(&w, pExpr);
71692 }
@@ -109240,11 +109253,11 @@
109240 ** table, then there are always 20 bytes of zeroed padding following the
109241 ** nNode bytes of content (see sqlite3Fts3ReadBlock() for details).
109242 */
109243 zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
109244 zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
109245 if( zCsr>=zEnd ){
109246 return SQLITE_CORRUPT;
109247 }
109248
109249 while( zCsr<zEnd && (piFirst || piLast) ){
109250 int cmp; /* memcmp() result */
@@ -110871,12 +110884,17 @@
110871 }
110872 }
110873 }
110874 }
110875
110876 *paOut = aRet;
110877 *pnOut = nRet;
 
 
 
 
 
110878 sqlite3_free(aExpr);
110879 fts3ExprFreeSegReaders(pExpr);
110880
110881 }else{
110882 char *aLeft;
@@ -110945,10 +110963,11 @@
110945 }
110946 sqlite3_free(aRight);
110947 }
110948 }
110949
 
110950 return rc;
110951 }
110952
110953 /*
110954 ** This function is called from within xNext() for each row visited by
110955
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -650,11 +650,11 @@
650 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
651 ** [sqlite_version()] and [sqlite_source_id()].
652 */
653 #define SQLITE_VERSION "3.7.4"
654 #define SQLITE_VERSION_NUMBER 3007004
655 #define SQLITE_SOURCE_ID "2010-12-06 21:09:59 fabcb6b95e1d4059d1e6c6183f65846f6cbd5749"
656
657 /*
658 ** CAPI3REF: Run-Time Library Version Numbers
659 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
660 **
@@ -5381,11 +5381,12 @@
5381 ** the nominated column.)^ ^If the new row is not present in the table, or if
5382 ** it does not contain a blob or text value, or if another error occurs, an
5383 ** SQLite error code is returned and the blob handle is considered aborted.
5384 ** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
5385 ** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
5386 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
5387 ** always returns zero.
5388 **
5389 ** ^This function sets the database handle error code and message.
5390 */
5391 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
5392
@@ -9071,10 +9072,11 @@
9072 #define SQLITE_ColumnCache 0x02 /* Disable the column cache */
9073 #define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */
9074 #define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */
9075 #define SQLITE_IndexCover 0x10 /* Disable index covering table */
9076 #define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */
9077 #define SQLITE_FactorOutConst 0x40 /* Disable factoring out constants */
9078 #define SQLITE_OptMask 0xff /* Mask of all disablable opts */
9079
9080 /*
9081 ** Possible values for the sqlite.magic field.
9082 ** The numbers are obtained at random and have no special meaning, other
@@ -46906,21 +46908,17 @@
46908
46909 /* True if opening an ephemeral, temporary database */
46910 const int isTempDb = zFilename==0 || zFilename[0]==0;
46911
46912 /* Set the variable isMemdb to true for an in-memory database, or
46913 ** false for a file-based database.
 
 
46914 */
46915 #ifdef SQLITE_OMIT_MEMORYDB
46916 const int isMemdb = 0;
46917 #else
46918 const int isMemdb = (zFilename && strcmp(zFilename, ":memory:")==0)
46919 || (isTempDb && sqlite3TempInMemory(db));
 
 
46920 #endif
46921
46922 assert( db!=0 );
46923 assert( sqlite3_mutex_held(db->mutex) );
46924 assert( (flags&0xff)==flags ); /* flags fit in 8 bits */
@@ -61775,11 +61773,10 @@
61773 ** without data loss, then jump immediately to P2, or if P2==0
61774 ** raise an SQLITE_MISMATCH exception.
61775 */
61776 case OP_MustBeInt: { /* jump, in1 */
61777 pIn1 = &aMem[pOp->p1];
 
61778 applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
61779 if( (pIn1->flags & MEM_Int)==0 ){
61780 if( pOp->p2==0 ){
61781 rc = SQLITE_MISMATCH;
61782 goto abort_due_to_error;
@@ -66754,11 +66751,11 @@
66751 ** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
66752 ** so no mutex is required for access.
66753 */
66754 SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
66755 Incrblob *p = (Incrblob *)pBlob;
66756 return (p && p->pStmt) ? p->nByte : 0;
66757 }
66758
66759 /*
66760 ** Move an existing blob handle to point to a different row of the same
66761 ** database table.
@@ -66792,10 +66789,11 @@
66789 }
66790 assert( rc!=SQLITE_SCHEMA );
66791 }
66792
66793 rc = sqlite3ApiExit(db, rc);
66794 assert( rc==SQLITE_OK || p->pStmt==0 );
66795 sqlite3_mutex_leave(db->mutex);
66796 return rc;
66797 }
66798
66799 #endif /* #ifndef SQLITE_OMIT_INCRBLOB */
@@ -70297,10 +70295,11 @@
70295
70296 assert( !isRowid );
70297 sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
70298 dest.affinity = (u8)affinity;
70299 assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
70300 pExpr->x.pSelect->iLimit = 0;
70301 if( sqlite3Select(pParse, pExpr->x.pSelect, &dest) ){
70302 return 0;
70303 }
70304 pEList = pExpr->x.pSelect->pEList;
70305 if( ALWAYS(pEList!=0 && pEList->nExpr>0) ){
@@ -70397,10 +70396,11 @@
70396 VdbeComment((v, "Init EXISTS result"));
70397 }
70398 sqlite3ExprDelete(pParse->db, pSel->pLimit);
70399 pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0,
70400 &sqlite3IntTokens[1]);
70401 pSel->iLimit = 0;
70402 if( sqlite3Select(pParse, pSel, &dest) ){
70403 return 0;
70404 }
70405 rReg = dest.iParm;
70406 ExprSetIrreducible(pExpr);
@@ -71680,13 +71680,26 @@
71680
71681 /*
71682 ** Preevaluate constant subexpressions within pExpr and store the
71683 ** results in registers. Modify pExpr so that the constant subexpresions
71684 ** are TK_REGISTER opcodes that refer to the precomputed values.
71685 **
71686 ** This routine is a no-op if the jump to the cookie-check code has
71687 ** already occur. Since the cookie-check jump is generated prior to
71688 ** any other serious processing, this check ensures that there is no
71689 ** way to accidently bypass the constant initializations.
71690 **
71691 ** This routine is also a no-op if the SQLITE_FactorOutConst optimization
71692 ** is disabled via the sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS)
71693 ** interface. This allows test logic to verify that the same answer is
71694 ** obtained for queries regardless of whether or not constants are
71695 ** precomputed into registers or if they are inserted in-line.
71696 */
71697 SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse *pParse, Expr *pExpr){
71698 Walker w;
71699 if( pParse->cookieGoto ) return;
71700 if( (pParse->db->flags & SQLITE_FactorOutConst)!=0 ) return;
71701 w.xExprCallback = evalConstExpr;
71702 w.xSelectCallback = 0;
71703 w.pParse = pParse;
71704 sqlite3WalkExpr(&w, pExpr);
71705 }
@@ -109240,11 +109253,11 @@
109253 ** table, then there are always 20 bytes of zeroed padding following the
109254 ** nNode bytes of content (see sqlite3Fts3ReadBlock() for details).
109255 */
109256 zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
109257 zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
109258 if( zCsr>zEnd ){
109259 return SQLITE_CORRUPT;
109260 }
109261
109262 while( zCsr<zEnd && (piFirst || piLast) ){
109263 int cmp; /* memcmp() result */
@@ -110871,12 +110884,17 @@
110884 }
110885 }
110886 }
110887 }
110888
110889 if( rc==SQLITE_OK ){
110890 *paOut = aRet;
110891 *pnOut = nRet;
110892 }else{
110893 assert( *paOut==0 );
110894 sqlite3_free(aRet);
110895 }
110896 sqlite3_free(aExpr);
110897 fts3ExprFreeSegReaders(pExpr);
110898
110899 }else{
110900 char *aLeft;
@@ -110945,10 +110963,11 @@
110963 }
110964 sqlite3_free(aRight);
110965 }
110966 }
110967
110968 assert( rc==SQLITE_OK || *paOut==0 );
110969 return rc;
110970 }
110971
110972 /*
110973 ** This function is called from within xNext() for each row visited by
110974
+3 -2
--- 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.7.4"
111111
#define SQLITE_VERSION_NUMBER 3007004
112
-#define SQLITE_SOURCE_ID "2010-12-02 11:24:58 a94b9a395e0be9549d8c28e2b86b995c73c7b671"
112
+#define SQLITE_SOURCE_ID "2010-12-06 21:09:59 fabcb6b95e1d4059d1e6c6183f65846f6cbd5749"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
@@ -4838,11 +4838,12 @@
48384838
** the nominated column.)^ ^If the new row is not present in the table, or if
48394839
** it does not contain a blob or text value, or if another error occurs, an
48404840
** SQLite error code is returned and the blob handle is considered aborted.
48414841
** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
48424842
** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
4843
-** SQLITE_ABORT.
4843
+** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
4844
+** always returns zero.
48444845
**
48454846
** ^This function sets the database handle error code and message.
48464847
*/
48474848
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
48484849
48494850
--- 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.7.4"
111 #define SQLITE_VERSION_NUMBER 3007004
112 #define SQLITE_SOURCE_ID "2010-12-02 11:24:58 a94b9a395e0be9549d8c28e2b86b995c73c7b671"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -4838,11 +4838,12 @@
4838 ** the nominated column.)^ ^If the new row is not present in the table, or if
4839 ** it does not contain a blob or text value, or if another error occurs, an
4840 ** SQLite error code is returned and the blob handle is considered aborted.
4841 ** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
4842 ** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
4843 ** SQLITE_ABORT.
 
4844 **
4845 ** ^This function sets the database handle error code and message.
4846 */
4847 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
4848
4849
--- 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.7.4"
111 #define SQLITE_VERSION_NUMBER 3007004
112 #define SQLITE_SOURCE_ID "2010-12-06 21:09:59 fabcb6b95e1d4059d1e6c6183f65846f6cbd5749"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
@@ -4838,11 +4838,12 @@
4838 ** the nominated column.)^ ^If the new row is not present in the table, or if
4839 ** it does not contain a blob or text value, or if another error occurs, an
4840 ** SQLite error code is returned and the blob handle is considered aborted.
4841 ** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
4842 ** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
4843 ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
4844 ** always returns zero.
4845 **
4846 ** ^This function sets the database handle error code and message.
4847 */
4848 SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
4849
4850

Keyboard Shortcuts

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