Fossil SCM

Update the built-in SQLite amalgamation to the latest 3.7.8 beta.

drh 2011-09-17 17:35 trunk
Commit b54b8e751a1d1dfb1cc5f17732d74f162a6e89f4
2 files changed +19 -11 +1 -1
+19 -11
--- 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.7.8"
660660
#define SQLITE_VERSION_NUMBER 3007008
661
-#define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
661
+#define SQLITE_SOURCE_ID "2011-09-17 17:29:20 b31a7d7db9040d8eedaf1ecd89ea0033f579d0f1"
662662
663663
/*
664664
** CAPI3REF: Run-Time Library Version Numbers
665665
** KEYWORDS: sqlite3_version, sqlite3_sourceid
666666
**
@@ -14537,11 +14537,11 @@
1453714537
int flags,
1453814538
int *pOutFlags
1453914539
){
1454014540
int rc = SQLITE_NOMEM;
1454114541
sqlite3_file *pFile;
14542
- pFile = (sqlite3_file *)sqlite3Malloc(pVfs->szOsFile);
14542
+ pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);
1454314543
if( pFile ){
1454414544
rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
1454514545
if( rc!=SQLITE_OK ){
1454614546
sqlite3_free(pFile);
1454714547
}else{
@@ -32800,13 +32800,23 @@
3280032800
3280132801
/*
3280232802
** Make sure all writes to a particular file are committed to disk.
3280332803
*/
3280432804
static int winSync(sqlite3_file *id, int flags){
32805
-#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || defined(SQLITE_DEBUG)
32806
- winFile *pFile = (winFile*)id;
32805
+#ifndef SQLITE_NO_SYNC
32806
+ /*
32807
+ ** Used only when SQLITE_NO_SYNC is not defined.
32808
+ */
3280732809
BOOL rc;
32810
+#endif
32811
+#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || \
32812
+ (defined(SQLITE_TEST) && defined(SQLITE_DEBUG))
32813
+ /*
32814
+ ** Used when SQLITE_NO_SYNC is not defined and by the assert() and/or
32815
+ ** OSTRACE() macros.
32816
+ */
32817
+ winFile *pFile = (winFile*)id;
3280832818
#else
3280932819
UNUSED_PARAMETER(id);
3281032820
#endif
3281132821
3281232822
assert( pFile );
@@ -74581,15 +74591,14 @@
7458174591
Parse *pParse, /* Parsing context */
7458274592
Expr *pExpr, /* The IN, SELECT, or EXISTS operator */
7458374593
int rMayHaveNull, /* Register that records whether NULLs exist in RHS */
7458474594
int isRowid /* If true, LHS of IN operator is a rowid */
7458574595
){
74586
- int testAddr = 0; /* One-time test address */
74596
+ int testAddr = -1; /* One-time test address */
7458774597
int rReg = 0; /* Register storing resulting */
7458874598
Vdbe *v = sqlite3GetVdbe(pParse);
7458974599
if( NEVER(v==0) ) return 0;
74590
- assert( sqlite3VdbeCurrentAddr(v)>0 );
7459174600
sqlite3ExprCachePush(pParse);
7459274601
7459374602
/* This code must be run in its entirety every time it is encountered
7459474603
** if any of the following is true:
7459574604
**
@@ -74601,17 +74610,16 @@
7460174610
** save the results, and reuse the same result on subsequent invocations.
7460274611
*/
7460374612
if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
7460474613
int mem = ++pParse->nMem;
7460574614
testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem);
74606
- assert( testAddr>0 || pParse->db->mallocFailed );
7460774615
}
7460874616
7460974617
#ifndef SQLITE_OMIT_EXPLAIN
7461074618
if( pParse->explain==2 ){
7461174619
char *zMsg = sqlite3MPrintf(
74612
- pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr?"":"CORRELATED ",
74620
+ pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr>=0?"":"CORRELATED ",
7461374621
pExpr->op==TK_IN?"LIST":"SCALAR", pParse->iNextSelectId
7461474622
);
7461574623
sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
7461674624
}
7461774625
#endif
@@ -74699,13 +74707,13 @@
7469974707
/* If the expression is not constant then we will need to
7470074708
** disable the test that was generated above that makes sure
7470174709
** this code only executes once. Because for a non-constant
7470274710
** expression we need to rerun this code each time.
7470374711
*/
74704
- if( testAddr && !sqlite3ExprIsConstant(pE2) ){
74712
+ if( testAddr>=0 && !sqlite3ExprIsConstant(pE2) ){
7470574713
sqlite3VdbeChangeToNoop(v, testAddr);
74706
- testAddr = 0;
74714
+ testAddr = -1;
7470774715
}
7470874716
7470974717
/* Evaluate the expression and insert it into the temp table */
7471074718
if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
7471174719
sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
@@ -74770,11 +74778,11 @@
7477074778
ExprSetIrreducible(pExpr);
7477174779
break;
7477274780
}
7477374781
}
7477474782
74775
- if( testAddr ){
74783
+ if( testAddr>=0 ){
7477674784
sqlite3VdbeJumpHere(v, testAddr);
7477774785
}
7477874786
sqlite3ExprCachePop(pParse, 1);
7477974787
7478074788
return rReg;
7478174789
--- 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.7.8"
660 #define SQLITE_VERSION_NUMBER 3007008
661 #define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
662
663 /*
664 ** CAPI3REF: Run-Time Library Version Numbers
665 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
666 **
@@ -14537,11 +14537,11 @@
14537 int flags,
14538 int *pOutFlags
14539 ){
14540 int rc = SQLITE_NOMEM;
14541 sqlite3_file *pFile;
14542 pFile = (sqlite3_file *)sqlite3Malloc(pVfs->szOsFile);
14543 if( pFile ){
14544 rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
14545 if( rc!=SQLITE_OK ){
14546 sqlite3_free(pFile);
14547 }else{
@@ -32800,13 +32800,23 @@
32800
32801 /*
32802 ** Make sure all writes to a particular file are committed to disk.
32803 */
32804 static int winSync(sqlite3_file *id, int flags){
32805 #if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || defined(SQLITE_DEBUG)
32806 winFile *pFile = (winFile*)id;
 
 
32807 BOOL rc;
 
 
 
 
 
 
 
 
32808 #else
32809 UNUSED_PARAMETER(id);
32810 #endif
32811
32812 assert( pFile );
@@ -74581,15 +74591,14 @@
74581 Parse *pParse, /* Parsing context */
74582 Expr *pExpr, /* The IN, SELECT, or EXISTS operator */
74583 int rMayHaveNull, /* Register that records whether NULLs exist in RHS */
74584 int isRowid /* If true, LHS of IN operator is a rowid */
74585 ){
74586 int testAddr = 0; /* One-time test address */
74587 int rReg = 0; /* Register storing resulting */
74588 Vdbe *v = sqlite3GetVdbe(pParse);
74589 if( NEVER(v==0) ) return 0;
74590 assert( sqlite3VdbeCurrentAddr(v)>0 );
74591 sqlite3ExprCachePush(pParse);
74592
74593 /* This code must be run in its entirety every time it is encountered
74594 ** if any of the following is true:
74595 **
@@ -74601,17 +74610,16 @@
74601 ** save the results, and reuse the same result on subsequent invocations.
74602 */
74603 if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
74604 int mem = ++pParse->nMem;
74605 testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem);
74606 assert( testAddr>0 || pParse->db->mallocFailed );
74607 }
74608
74609 #ifndef SQLITE_OMIT_EXPLAIN
74610 if( pParse->explain==2 ){
74611 char *zMsg = sqlite3MPrintf(
74612 pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr?"":"CORRELATED ",
74613 pExpr->op==TK_IN?"LIST":"SCALAR", pParse->iNextSelectId
74614 );
74615 sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
74616 }
74617 #endif
@@ -74699,13 +74707,13 @@
74699 /* If the expression is not constant then we will need to
74700 ** disable the test that was generated above that makes sure
74701 ** this code only executes once. Because for a non-constant
74702 ** expression we need to rerun this code each time.
74703 */
74704 if( testAddr && !sqlite3ExprIsConstant(pE2) ){
74705 sqlite3VdbeChangeToNoop(v, testAddr);
74706 testAddr = 0;
74707 }
74708
74709 /* Evaluate the expression and insert it into the temp table */
74710 if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
74711 sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
@@ -74770,11 +74778,11 @@
74770 ExprSetIrreducible(pExpr);
74771 break;
74772 }
74773 }
74774
74775 if( testAddr ){
74776 sqlite3VdbeJumpHere(v, testAddr);
74777 }
74778 sqlite3ExprCachePop(pParse, 1);
74779
74780 return rReg;
74781
--- 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.7.8"
660 #define SQLITE_VERSION_NUMBER 3007008
661 #define SQLITE_SOURCE_ID "2011-09-17 17:29:20 b31a7d7db9040d8eedaf1ecd89ea0033f579d0f1"
662
663 /*
664 ** CAPI3REF: Run-Time Library Version Numbers
665 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
666 **
@@ -14537,11 +14537,11 @@
14537 int flags,
14538 int *pOutFlags
14539 ){
14540 int rc = SQLITE_NOMEM;
14541 sqlite3_file *pFile;
14542 pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);
14543 if( pFile ){
14544 rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
14545 if( rc!=SQLITE_OK ){
14546 sqlite3_free(pFile);
14547 }else{
@@ -32800,13 +32800,23 @@
32800
32801 /*
32802 ** Make sure all writes to a particular file are committed to disk.
32803 */
32804 static int winSync(sqlite3_file *id, int flags){
32805 #ifndef SQLITE_NO_SYNC
32806 /*
32807 ** Used only when SQLITE_NO_SYNC is not defined.
32808 */
32809 BOOL rc;
32810 #endif
32811 #if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || \
32812 (defined(SQLITE_TEST) && defined(SQLITE_DEBUG))
32813 /*
32814 ** Used when SQLITE_NO_SYNC is not defined and by the assert() and/or
32815 ** OSTRACE() macros.
32816 */
32817 winFile *pFile = (winFile*)id;
32818 #else
32819 UNUSED_PARAMETER(id);
32820 #endif
32821
32822 assert( pFile );
@@ -74581,15 +74591,14 @@
74591 Parse *pParse, /* Parsing context */
74592 Expr *pExpr, /* The IN, SELECT, or EXISTS operator */
74593 int rMayHaveNull, /* Register that records whether NULLs exist in RHS */
74594 int isRowid /* If true, LHS of IN operator is a rowid */
74595 ){
74596 int testAddr = -1; /* One-time test address */
74597 int rReg = 0; /* Register storing resulting */
74598 Vdbe *v = sqlite3GetVdbe(pParse);
74599 if( NEVER(v==0) ) return 0;
 
74600 sqlite3ExprCachePush(pParse);
74601
74602 /* This code must be run in its entirety every time it is encountered
74603 ** if any of the following is true:
74604 **
@@ -74601,17 +74610,16 @@
74610 ** save the results, and reuse the same result on subsequent invocations.
74611 */
74612 if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
74613 int mem = ++pParse->nMem;
74614 testAddr = sqlite3VdbeAddOp1(v, OP_Once, mem);
 
74615 }
74616
74617 #ifndef SQLITE_OMIT_EXPLAIN
74618 if( pParse->explain==2 ){
74619 char *zMsg = sqlite3MPrintf(
74620 pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr>=0?"":"CORRELATED ",
74621 pExpr->op==TK_IN?"LIST":"SCALAR", pParse->iNextSelectId
74622 );
74623 sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
74624 }
74625 #endif
@@ -74699,13 +74707,13 @@
74707 /* If the expression is not constant then we will need to
74708 ** disable the test that was generated above that makes sure
74709 ** this code only executes once. Because for a non-constant
74710 ** expression we need to rerun this code each time.
74711 */
74712 if( testAddr>=0 && !sqlite3ExprIsConstant(pE2) ){
74713 sqlite3VdbeChangeToNoop(v, testAddr);
74714 testAddr = -1;
74715 }
74716
74717 /* Evaluate the expression and insert it into the temp table */
74718 if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
74719 sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
@@ -74770,11 +74778,11 @@
74778 ExprSetIrreducible(pExpr);
74779 break;
74780 }
74781 }
74782
74783 if( testAddr>=0 ){
74784 sqlite3VdbeJumpHere(v, testAddr);
74785 }
74786 sqlite3ExprCachePop(pParse, 1);
74787
74788 return rReg;
74789
+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.8"
111111
#define SQLITE_VERSION_NUMBER 3007008
112
-#define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
112
+#define SQLITE_SOURCE_ID "2011-09-17 17:29:20 b31a7d7db9040d8eedaf1ecd89ea0033f579d0f1"
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.8"
111 #define SQLITE_VERSION_NUMBER 3007008
112 #define SQLITE_SOURCE_ID "2011-09-16 19:04:03 cf51ef8ab8a610ddf64f66970dd689fe1df405b8"
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.8"
111 #define SQLITE_VERSION_NUMBER 3007008
112 #define SQLITE_SOURCE_ID "2011-09-17 17:29:20 b31a7d7db9040d8eedaf1ecd89ea0033f579d0f1"
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