Fossil SCM

Update the built-in SQLite to the lastest 3.7.6 alpha out of the head of the SQLite trunk.

drh 2011-02-20 20:57 trunk
Commit d1790d6954558d7c97c371dabc9fb60d915550da
2 files changed +51 -28 +1 -1
+51 -28
--- 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.6"
654654
#define SQLITE_VERSION_NUMBER 3007006
655
-#define SQLITE_SOURCE_ID "2011-02-16 23:32:24 31fc4ba66e76876b2e7b6b2b74c07f47571938ce"
655
+#define SQLITE_SOURCE_ID "2011-02-19 23:18:12 e87d499a4f8a456111c1f96ca6da31d0810fb7c8"
656656
657657
/*
658658
** CAPI3REF: Run-Time Library Version Numbers
659659
** KEYWORDS: sqlite3_version, sqlite3_sourceid
660660
**
@@ -43796,14 +43796,35 @@
4379643796
int i; /* Loop counter */
4379743797
int rc = SQLITE_OK; /* Return code */
4379843798
4379943799
assert( pWal->readLock<0 ); /* Not currently locked */
4380043800
43801
- /* Take steps to avoid spinning forever if there is a protocol error. */
43801
+ /* Take steps to avoid spinning forever if there is a protocol error.
43802
+ **
43803
+ ** Circumstances that cause a RETRY should only last for the briefest
43804
+ ** instances of time. No I/O or other system calls are done while the
43805
+ ** locks are held, so the locks should not be held for very long. But
43806
+ ** if we are unlucky, another process that is holding a lock might get
43807
+ ** paged out or take a page-fault that is time-consuming to resolve,
43808
+ ** during the few nanoseconds that it is holding the lock. In that case,
43809
+ ** it might take longer than normal for the lock to free.
43810
+ **
43811
+ ** After 5 RETRYs, we begin calling sqlite3OsSleep(). The first few
43812
+ ** calls to sqlite3OsSleep() have a delay of 1 microsecond. Really this
43813
+ ** is more of a scheduler yield than an actual delay. But on the 10th
43814
+ ** an subsequent retries, the delays start becoming longer and longer,
43815
+ ** so that on the 100th (and last) RETRY we delay for 21 milliseconds.
43816
+ ** The total delay time before giving up is less than 1 second.
43817
+ */
4380243818
if( cnt>5 ){
43803
- if( cnt>100 ) return SQLITE_PROTOCOL;
43804
- sqlite3OsSleep(pWal->pVfs, 1);
43819
+ int nDelay = 1; /* Pause time in microseconds */
43820
+ if( cnt>100 ){
43821
+ VVA_ONLY( pWal->lockError = 1; )
43822
+ return SQLITE_PROTOCOL;
43823
+ }
43824
+ if( cnt>=10 ) nDelay = (cnt-9)*238; /* Max delay 21ms. Total delay 996ms */
43825
+ sqlite3OsSleep(pWal->pVfs, nDelay);
4380543826
}
4380643827
4380743828
if( !useWal ){
4380843829
rc = walIndexReadHdr(pWal, pChanged);
4380943830
if( rc==SQLITE_BUSY ){
@@ -43881,26 +43902,13 @@
4388143902
assert( thisMark!=READMARK_NOT_USED );
4388243903
mxReadMark = thisMark;
4388343904
mxI = i;
4388443905
}
4388543906
}
43886
- if( mxI==0 ){
43887
- /* If we get here, it means that all of the aReadMark[] entries between
43888
- ** 1 and WAL_NREADER-1 are zero. Try to initialize aReadMark[1] to
43889
- ** be mxFrame, then retry.
43890
- */
43891
- rc = walLockExclusive(pWal, WAL_READ_LOCK(1), 1);
43892
- if( rc==SQLITE_OK ){
43893
- pInfo->aReadMark[1] = pWal->hdr.mxFrame;
43894
- walUnlockExclusive(pWal, WAL_READ_LOCK(1), 1);
43895
- rc = WAL_RETRY;
43896
- }else if( rc==SQLITE_BUSY ){
43897
- rc = WAL_RETRY;
43898
- }
43899
- return rc;
43900
- }else{
43901
- if( mxReadMark < pWal->hdr.mxFrame ){
43907
+ /* There was once an "if" here. The extra "{" is to preserve indentation. */
43908
+ {
43909
+ if( mxReadMark < pWal->hdr.mxFrame || mxI==0 ){
4390243910
for(i=1; i<WAL_NREADER; i++){
4390343911
rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1);
4390443912
if( rc==SQLITE_OK ){
4390543913
mxReadMark = pInfo->aReadMark[i] = pWal->hdr.mxFrame;
4390643914
mxI = i;
@@ -43909,10 +43917,14 @@
4390943917
}else if( rc!=SQLITE_BUSY ){
4391043918
return rc;
4391143919
}
4391243920
}
4391343921
}
43922
+ if( mxI==0 ){
43923
+ assert( rc==SQLITE_BUSY );
43924
+ return WAL_RETRY;
43925
+ }
4391443926
4391543927
rc = walLockShared(pWal, WAL_READ_LOCK(mxI));
4391643928
if( rc ){
4391743929
return rc==SQLITE_BUSY ? WAL_RETRY : rc;
4391843930
}
@@ -43969,10 +43981,14 @@
4396943981
int cnt = 0; /* Number of TryBeginRead attempts */
4397043982
4397143983
do{
4397243984
rc = walTryBeginRead(pWal, pChanged, 0, ++cnt);
4397343985
}while( rc==WAL_RETRY );
43986
+ testcase( (rc&0xff)==SQLITE_BUSY );
43987
+ testcase( (rc&0xff)==SQLITE_IOERR );
43988
+ testcase( rc==SQLITE_PROTOCOL );
43989
+ testcase( rc==SQLITE_OK );
4397443990
return rc;
4397543991
}
4397643992
4397743993
/*
4397843994
** Finish with a read transaction. All this does is release the
@@ -44286,10 +44302,12 @@
4428644302
4428744303
if( pWal->readLock==0 ){
4428844304
volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
4428944305
assert( pInfo->nBackfill==pWal->hdr.mxFrame );
4429044306
if( pInfo->nBackfill>0 ){
44307
+ u32 salt1;
44308
+ sqlite3_randomness(4, &salt1);
4429144309
rc = walLockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
4429244310
if( rc==SQLITE_OK ){
4429344311
/* If all readers are using WAL_READ_LOCK(0) (in other words if no
4429444312
** readers are currently using the WAL), then the transactions
4429544313
** frames will overwrite the start of the existing log. Update the
@@ -44303,11 +44321,11 @@
4430344321
int i; /* Loop counter */
4430444322
u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
4430544323
pWal->nCkpt++;
4430644324
pWal->hdr.mxFrame = 0;
4430744325
sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
44308
- sqlite3_randomness(4, &aSalt[1]);
44326
+ aSalt[1] = salt1;
4430944327
walIndexWriteHdr(pWal);
4431044328
pInfo->nBackfill = 0;
4431144329
for(i=1; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
4431244330
assert( pInfo->aReadMark[0]==0 );
4431344331
walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
@@ -44320,10 +44338,14 @@
4432044338
cnt = 0;
4432144339
do{
4432244340
int notUsed;
4432344341
rc = walTryBeginRead(pWal, &notUsed, 1, ++cnt);
4432444342
}while( rc==WAL_RETRY );
44343
+ assert( (rc&0xff)!=SQLITE_BUSY ); /* BUSY not possible when useWal==1 */
44344
+ testcase( (rc&0xff)==SQLITE_IOERR );
44345
+ testcase( rc==SQLITE_PROTOCOL );
44346
+ testcase( rc==SQLITE_OK );
4432544347
}
4432644348
return rc;
4432744349
}
4432844350
4432944351
/*
@@ -55589,10 +55611,11 @@
5558955611
pVal->r = (double)-1 * pVal->r;
5559055612
sqlite3ValueApplyAffinity(pVal, affinity, enc);
5559155613
}
5559255614
}else if( op==TK_NULL ){
5559355615
pVal = sqlite3ValueNew(db);
55616
+ if( pVal==0 ) goto no_mem;
5559455617
}
5559555618
#ifndef SQLITE_OMIT_BLOB_LITERAL
5559655619
else if( op==TK_BLOB ){
5559755620
int nVal;
5559855621
assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
@@ -70417,20 +70440,21 @@
7041770440
** in *pValue. If the expression is not an integer or if it is too big
7041870441
** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
7041970442
*/
7042070443
SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr *p, int *pValue){
7042170444
int rc = 0;
70445
+
70446
+ /* If an expression is an integer literal that fits in a signed 32-bit
70447
+ ** integer, then the EP_IntValue flag will have already been set */
70448
+ assert( p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0
70449
+ || sqlite3GetInt32(p->u.zToken, &rc)==0 );
70450
+
7042270451
if( p->flags & EP_IntValue ){
7042370452
*pValue = p->u.iValue;
7042470453
return 1;
7042570454
}
7042670455
switch( p->op ){
70427
- case TK_INTEGER: {
70428
- rc = sqlite3GetInt32(p->u.zToken, pValue);
70429
- assert( rc==0 );
70430
- break;
70431
- }
7043270456
case TK_UPLUS: {
7043370457
rc = sqlite3ExprIsInteger(p->pLeft, pValue);
7043470458
break;
7043570459
}
7043670460
case TK_UMINUS: {
@@ -97870,12 +97894,11 @@
9787097894
if( (idxCols & cMask)==0 ){
9787197895
Expr *pX = pTerm->pExpr;
9787297896
idxCols |= cMask;
9787397897
pIdx->aiColumn[n] = pTerm->u.leftColumn;
9787497898
pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
97875
- assert( pColl!=0 || pParse->nErr>0 );
97876
- pIdx->azColl[n] = pColl ? pColl->zName : "BINARY";
97899
+ pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : "BINARY";
9787797900
n++;
9787897901
}
9787997902
}
9788097903
}
9788197904
assert( (u32)n==pLevel->plan.nEq );
9788297905
--- 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.6"
654 #define SQLITE_VERSION_NUMBER 3007006
655 #define SQLITE_SOURCE_ID "2011-02-16 23:32:24 31fc4ba66e76876b2e7b6b2b74c07f47571938ce"
656
657 /*
658 ** CAPI3REF: Run-Time Library Version Numbers
659 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
660 **
@@ -43796,14 +43796,35 @@
43796 int i; /* Loop counter */
43797 int rc = SQLITE_OK; /* Return code */
43798
43799 assert( pWal->readLock<0 ); /* Not currently locked */
43800
43801 /* Take steps to avoid spinning forever if there is a protocol error. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43802 if( cnt>5 ){
43803 if( cnt>100 ) return SQLITE_PROTOCOL;
43804 sqlite3OsSleep(pWal->pVfs, 1);
 
 
 
 
 
43805 }
43806
43807 if( !useWal ){
43808 rc = walIndexReadHdr(pWal, pChanged);
43809 if( rc==SQLITE_BUSY ){
@@ -43881,26 +43902,13 @@
43881 assert( thisMark!=READMARK_NOT_USED );
43882 mxReadMark = thisMark;
43883 mxI = i;
43884 }
43885 }
43886 if( mxI==0 ){
43887 /* If we get here, it means that all of the aReadMark[] entries between
43888 ** 1 and WAL_NREADER-1 are zero. Try to initialize aReadMark[1] to
43889 ** be mxFrame, then retry.
43890 */
43891 rc = walLockExclusive(pWal, WAL_READ_LOCK(1), 1);
43892 if( rc==SQLITE_OK ){
43893 pInfo->aReadMark[1] = pWal->hdr.mxFrame;
43894 walUnlockExclusive(pWal, WAL_READ_LOCK(1), 1);
43895 rc = WAL_RETRY;
43896 }else if( rc==SQLITE_BUSY ){
43897 rc = WAL_RETRY;
43898 }
43899 return rc;
43900 }else{
43901 if( mxReadMark < pWal->hdr.mxFrame ){
43902 for(i=1; i<WAL_NREADER; i++){
43903 rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1);
43904 if( rc==SQLITE_OK ){
43905 mxReadMark = pInfo->aReadMark[i] = pWal->hdr.mxFrame;
43906 mxI = i;
@@ -43909,10 +43917,14 @@
43909 }else if( rc!=SQLITE_BUSY ){
43910 return rc;
43911 }
43912 }
43913 }
 
 
 
 
43914
43915 rc = walLockShared(pWal, WAL_READ_LOCK(mxI));
43916 if( rc ){
43917 return rc==SQLITE_BUSY ? WAL_RETRY : rc;
43918 }
@@ -43969,10 +43981,14 @@
43969 int cnt = 0; /* Number of TryBeginRead attempts */
43970
43971 do{
43972 rc = walTryBeginRead(pWal, pChanged, 0, ++cnt);
43973 }while( rc==WAL_RETRY );
 
 
 
 
43974 return rc;
43975 }
43976
43977 /*
43978 ** Finish with a read transaction. All this does is release the
@@ -44286,10 +44302,12 @@
44286
44287 if( pWal->readLock==0 ){
44288 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
44289 assert( pInfo->nBackfill==pWal->hdr.mxFrame );
44290 if( pInfo->nBackfill>0 ){
 
 
44291 rc = walLockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
44292 if( rc==SQLITE_OK ){
44293 /* If all readers are using WAL_READ_LOCK(0) (in other words if no
44294 ** readers are currently using the WAL), then the transactions
44295 ** frames will overwrite the start of the existing log. Update the
@@ -44303,11 +44321,11 @@
44303 int i; /* Loop counter */
44304 u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
44305 pWal->nCkpt++;
44306 pWal->hdr.mxFrame = 0;
44307 sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
44308 sqlite3_randomness(4, &aSalt[1]);
44309 walIndexWriteHdr(pWal);
44310 pInfo->nBackfill = 0;
44311 for(i=1; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
44312 assert( pInfo->aReadMark[0]==0 );
44313 walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
@@ -44320,10 +44338,14 @@
44320 cnt = 0;
44321 do{
44322 int notUsed;
44323 rc = walTryBeginRead(pWal, &notUsed, 1, ++cnt);
44324 }while( rc==WAL_RETRY );
 
 
 
 
44325 }
44326 return rc;
44327 }
44328
44329 /*
@@ -55589,10 +55611,11 @@
55589 pVal->r = (double)-1 * pVal->r;
55590 sqlite3ValueApplyAffinity(pVal, affinity, enc);
55591 }
55592 }else if( op==TK_NULL ){
55593 pVal = sqlite3ValueNew(db);
 
55594 }
55595 #ifndef SQLITE_OMIT_BLOB_LITERAL
55596 else if( op==TK_BLOB ){
55597 int nVal;
55598 assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
@@ -70417,20 +70440,21 @@
70417 ** in *pValue. If the expression is not an integer or if it is too big
70418 ** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
70419 */
70420 SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr *p, int *pValue){
70421 int rc = 0;
 
 
 
 
 
 
70422 if( p->flags & EP_IntValue ){
70423 *pValue = p->u.iValue;
70424 return 1;
70425 }
70426 switch( p->op ){
70427 case TK_INTEGER: {
70428 rc = sqlite3GetInt32(p->u.zToken, pValue);
70429 assert( rc==0 );
70430 break;
70431 }
70432 case TK_UPLUS: {
70433 rc = sqlite3ExprIsInteger(p->pLeft, pValue);
70434 break;
70435 }
70436 case TK_UMINUS: {
@@ -97870,12 +97894,11 @@
97870 if( (idxCols & cMask)==0 ){
97871 Expr *pX = pTerm->pExpr;
97872 idxCols |= cMask;
97873 pIdx->aiColumn[n] = pTerm->u.leftColumn;
97874 pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
97875 assert( pColl!=0 || pParse->nErr>0 );
97876 pIdx->azColl[n] = pColl ? pColl->zName : "BINARY";
97877 n++;
97878 }
97879 }
97880 }
97881 assert( (u32)n==pLevel->plan.nEq );
97882
--- 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.6"
654 #define SQLITE_VERSION_NUMBER 3007006
655 #define SQLITE_SOURCE_ID "2011-02-19 23:18:12 e87d499a4f8a456111c1f96ca6da31d0810fb7c8"
656
657 /*
658 ** CAPI3REF: Run-Time Library Version Numbers
659 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
660 **
@@ -43796,14 +43796,35 @@
43796 int i; /* Loop counter */
43797 int rc = SQLITE_OK; /* Return code */
43798
43799 assert( pWal->readLock<0 ); /* Not currently locked */
43800
43801 /* Take steps to avoid spinning forever if there is a protocol error.
43802 **
43803 ** Circumstances that cause a RETRY should only last for the briefest
43804 ** instances of time. No I/O or other system calls are done while the
43805 ** locks are held, so the locks should not be held for very long. But
43806 ** if we are unlucky, another process that is holding a lock might get
43807 ** paged out or take a page-fault that is time-consuming to resolve,
43808 ** during the few nanoseconds that it is holding the lock. In that case,
43809 ** it might take longer than normal for the lock to free.
43810 **
43811 ** After 5 RETRYs, we begin calling sqlite3OsSleep(). The first few
43812 ** calls to sqlite3OsSleep() have a delay of 1 microsecond. Really this
43813 ** is more of a scheduler yield than an actual delay. But on the 10th
43814 ** an subsequent retries, the delays start becoming longer and longer,
43815 ** so that on the 100th (and last) RETRY we delay for 21 milliseconds.
43816 ** The total delay time before giving up is less than 1 second.
43817 */
43818 if( cnt>5 ){
43819 int nDelay = 1; /* Pause time in microseconds */
43820 if( cnt>100 ){
43821 VVA_ONLY( pWal->lockError = 1; )
43822 return SQLITE_PROTOCOL;
43823 }
43824 if( cnt>=10 ) nDelay = (cnt-9)*238; /* Max delay 21ms. Total delay 996ms */
43825 sqlite3OsSleep(pWal->pVfs, nDelay);
43826 }
43827
43828 if( !useWal ){
43829 rc = walIndexReadHdr(pWal, pChanged);
43830 if( rc==SQLITE_BUSY ){
@@ -43881,26 +43902,13 @@
43902 assert( thisMark!=READMARK_NOT_USED );
43903 mxReadMark = thisMark;
43904 mxI = i;
43905 }
43906 }
43907 /* There was once an "if" here. The extra "{" is to preserve indentation. */
43908 {
43909 if( mxReadMark < pWal->hdr.mxFrame || mxI==0 ){
 
 
 
 
 
 
 
 
 
 
 
 
 
43910 for(i=1; i<WAL_NREADER; i++){
43911 rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1);
43912 if( rc==SQLITE_OK ){
43913 mxReadMark = pInfo->aReadMark[i] = pWal->hdr.mxFrame;
43914 mxI = i;
@@ -43909,10 +43917,14 @@
43917 }else if( rc!=SQLITE_BUSY ){
43918 return rc;
43919 }
43920 }
43921 }
43922 if( mxI==0 ){
43923 assert( rc==SQLITE_BUSY );
43924 return WAL_RETRY;
43925 }
43926
43927 rc = walLockShared(pWal, WAL_READ_LOCK(mxI));
43928 if( rc ){
43929 return rc==SQLITE_BUSY ? WAL_RETRY : rc;
43930 }
@@ -43969,10 +43981,14 @@
43981 int cnt = 0; /* Number of TryBeginRead attempts */
43982
43983 do{
43984 rc = walTryBeginRead(pWal, pChanged, 0, ++cnt);
43985 }while( rc==WAL_RETRY );
43986 testcase( (rc&0xff)==SQLITE_BUSY );
43987 testcase( (rc&0xff)==SQLITE_IOERR );
43988 testcase( rc==SQLITE_PROTOCOL );
43989 testcase( rc==SQLITE_OK );
43990 return rc;
43991 }
43992
43993 /*
43994 ** Finish with a read transaction. All this does is release the
@@ -44286,10 +44302,12 @@
44302
44303 if( pWal->readLock==0 ){
44304 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
44305 assert( pInfo->nBackfill==pWal->hdr.mxFrame );
44306 if( pInfo->nBackfill>0 ){
44307 u32 salt1;
44308 sqlite3_randomness(4, &salt1);
44309 rc = walLockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
44310 if( rc==SQLITE_OK ){
44311 /* If all readers are using WAL_READ_LOCK(0) (in other words if no
44312 ** readers are currently using the WAL), then the transactions
44313 ** frames will overwrite the start of the existing log. Update the
@@ -44303,11 +44321,11 @@
44321 int i; /* Loop counter */
44322 u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
44323 pWal->nCkpt++;
44324 pWal->hdr.mxFrame = 0;
44325 sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
44326 aSalt[1] = salt1;
44327 walIndexWriteHdr(pWal);
44328 pInfo->nBackfill = 0;
44329 for(i=1; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
44330 assert( pInfo->aReadMark[0]==0 );
44331 walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
@@ -44320,10 +44338,14 @@
44338 cnt = 0;
44339 do{
44340 int notUsed;
44341 rc = walTryBeginRead(pWal, &notUsed, 1, ++cnt);
44342 }while( rc==WAL_RETRY );
44343 assert( (rc&0xff)!=SQLITE_BUSY ); /* BUSY not possible when useWal==1 */
44344 testcase( (rc&0xff)==SQLITE_IOERR );
44345 testcase( rc==SQLITE_PROTOCOL );
44346 testcase( rc==SQLITE_OK );
44347 }
44348 return rc;
44349 }
44350
44351 /*
@@ -55589,10 +55611,11 @@
55611 pVal->r = (double)-1 * pVal->r;
55612 sqlite3ValueApplyAffinity(pVal, affinity, enc);
55613 }
55614 }else if( op==TK_NULL ){
55615 pVal = sqlite3ValueNew(db);
55616 if( pVal==0 ) goto no_mem;
55617 }
55618 #ifndef SQLITE_OMIT_BLOB_LITERAL
55619 else if( op==TK_BLOB ){
55620 int nVal;
55621 assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
@@ -70417,20 +70440,21 @@
70440 ** in *pValue. If the expression is not an integer or if it is too big
70441 ** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
70442 */
70443 SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr *p, int *pValue){
70444 int rc = 0;
70445
70446 /* If an expression is an integer literal that fits in a signed 32-bit
70447 ** integer, then the EP_IntValue flag will have already been set */
70448 assert( p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0
70449 || sqlite3GetInt32(p->u.zToken, &rc)==0 );
70450
70451 if( p->flags & EP_IntValue ){
70452 *pValue = p->u.iValue;
70453 return 1;
70454 }
70455 switch( p->op ){
 
 
 
 
 
70456 case TK_UPLUS: {
70457 rc = sqlite3ExprIsInteger(p->pLeft, pValue);
70458 break;
70459 }
70460 case TK_UMINUS: {
@@ -97870,12 +97894,11 @@
97894 if( (idxCols & cMask)==0 ){
97895 Expr *pX = pTerm->pExpr;
97896 idxCols |= cMask;
97897 pIdx->aiColumn[n] = pTerm->u.leftColumn;
97898 pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
97899 pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : "BINARY";
 
97900 n++;
97901 }
97902 }
97903 }
97904 assert( (u32)n==pLevel->plan.nEq );
97905
+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.7.6"
111111
#define SQLITE_VERSION_NUMBER 3007006
112
-#define SQLITE_SOURCE_ID "2011-02-16 23:32:24 31fc4ba66e76876b2e7b6b2b74c07f47571938ce"
112
+#define SQLITE_SOURCE_ID "2011-02-19 23:18:12 e87d499a4f8a456111c1f96ca6da31d0810fb7c8"
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.7.6"
111 #define SQLITE_VERSION_NUMBER 3007006
112 #define SQLITE_SOURCE_ID "2011-02-16 23:32:24 31fc4ba66e76876b2e7b6b2b74c07f47571938ce"
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.7.6"
111 #define SQLITE_VERSION_NUMBER 3007006
112 #define SQLITE_SOURCE_ID "2011-02-19 23:18:12 e87d499a4f8a456111c1f96ca6da31d0810fb7c8"
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