Fossil SCM

Update to the latest SQLite trunk version. (This is for testing SQLite, not for Fossil's benefit.)

drh 2012-05-04 23:14 trunk
Commit 59169e4d161379f78cc57d43a586a7b63779fb31
2 files changed +11 -5 +1 -1
+11 -5
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -657,11 +657,11 @@
657657
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
658658
** [sqlite_version()] and [sqlite_source_id()].
659659
*/
660660
#define SQLITE_VERSION "3.7.12"
661661
#define SQLITE_VERSION_NUMBER 3007012
662
-#define SQLITE_SOURCE_ID "2012-04-24 13:14:49 dfce8569765614462a3952d1761c10d579984665"
662
+#define SQLITE_SOURCE_ID "2012-05-01 14:21:57 bfa61e781cb442be641486e7e55a1518e888d830"
663663
664664
/*
665665
** CAPI3REF: Run-Time Library Version Numbers
666666
** KEYWORDS: sqlite3_version, sqlite3_sourceid
667667
**
@@ -41583,11 +41583,11 @@
4158341583
** They will never be read by any client. So remove them from the pDirty
4158441584
** list here. */
4158541585
PgHdr *p;
4158641586
PgHdr **ppNext = &pList;
4158741587
nList = 0;
41588
- for(p=pList; (*ppNext = p); p=p->pDirty){
41588
+ for(p=pList; (*ppNext = p)!=0; p=p->pDirty){
4158941589
if( p->pgno<=nTruncate ){
4159041590
ppNext = &p->pDirty;
4159141591
nList++;
4159241592
}
4159341593
}
@@ -74273,11 +74273,11 @@
7427374273
NameContext *pNC, /* The name context of the SELECT statement */
7427474274
Select *pSelect, /* The SELECT statement holding pOrderBy */
7427574275
ExprList *pOrderBy, /* An ORDER BY or GROUP BY clause to resolve */
7427674276
const char *zType /* Either "ORDER" or "GROUP", as appropriate */
7427774277
){
74278
- int i; /* Loop counter */
74278
+ int i, j; /* Loop counters */
7427974279
int iCol; /* Column number */
7428074280
struct ExprList_item *pItem; /* A term of the ORDER BY clause */
7428174281
Parse *pParse; /* Parsing context */
7428274282
int nResult; /* Number of terms in the result set */
7428374283
@@ -74309,10 +74309,15 @@
7430974309
7431074310
/* Otherwise, treat the ORDER BY term as an ordinary expression */
7431174311
pItem->iOrderByCol = 0;
7431274312
if( sqlite3ResolveExprNames(pNC, pE) ){
7431374313
return 1;
74314
+ }
74315
+ for(j=0; j<pSelect->pEList->nExpr; j++){
74316
+ if( sqlite3ExprCompare(pE, pSelect->pEList->a[j].pExpr)==0 ){
74317
+ pItem->iOrderByCol = j+1;
74318
+ }
7431474319
}
7431574320
}
7431674321
return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);
7431774322
}
7431874323
@@ -102256,11 +102261,11 @@
102256102261
Table *pTab,
102257102262
Module *pMod,
102258102263
int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
102259102264
char **pzErr
102260102265
){
102261
- VtabCtx sCtx;
102266
+ VtabCtx sCtx, *pPriorCtx;
102262102267
VTable *pVTable;
102263102268
int rc;
102264102269
const char *const*azArg = (const char *const*)pTab->azModuleArg;
102265102270
int nArg = pTab->nModuleArg;
102266102271
char *zErr = 0;
@@ -102281,13 +102286,14 @@
102281102286
/* Invoke the virtual table constructor */
102282102287
assert( &db->pVtabCtx );
102283102288
assert( xConstruct );
102284102289
sCtx.pTab = pTab;
102285102290
sCtx.pVTable = pVTable;
102291
+ pPriorCtx = db->pVtabCtx;
102286102292
db->pVtabCtx = &sCtx;
102287102293
rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
102288
- db->pVtabCtx = 0;
102294
+ db->pVtabCtx = pPriorCtx;
102289102295
if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
102290102296
102291102297
if( SQLITE_OK!=rc ){
102292102298
if( zErr==0 ){
102293102299
*pzErr = sqlite3MPrintf(db, "vtable constructor failed: %s", zModuleName);
102294102300
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -657,11 +657,11 @@
657 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
658 ** [sqlite_version()] and [sqlite_source_id()].
659 */
660 #define SQLITE_VERSION "3.7.12"
661 #define SQLITE_VERSION_NUMBER 3007012
662 #define SQLITE_SOURCE_ID "2012-04-24 13:14:49 dfce8569765614462a3952d1761c10d579984665"
663
664 /*
665 ** CAPI3REF: Run-Time Library Version Numbers
666 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
667 **
@@ -41583,11 +41583,11 @@
41583 ** They will never be read by any client. So remove them from the pDirty
41584 ** list here. */
41585 PgHdr *p;
41586 PgHdr **ppNext = &pList;
41587 nList = 0;
41588 for(p=pList; (*ppNext = p); p=p->pDirty){
41589 if( p->pgno<=nTruncate ){
41590 ppNext = &p->pDirty;
41591 nList++;
41592 }
41593 }
@@ -74273,11 +74273,11 @@
74273 NameContext *pNC, /* The name context of the SELECT statement */
74274 Select *pSelect, /* The SELECT statement holding pOrderBy */
74275 ExprList *pOrderBy, /* An ORDER BY or GROUP BY clause to resolve */
74276 const char *zType /* Either "ORDER" or "GROUP", as appropriate */
74277 ){
74278 int i; /* Loop counter */
74279 int iCol; /* Column number */
74280 struct ExprList_item *pItem; /* A term of the ORDER BY clause */
74281 Parse *pParse; /* Parsing context */
74282 int nResult; /* Number of terms in the result set */
74283
@@ -74309,10 +74309,15 @@
74309
74310 /* Otherwise, treat the ORDER BY term as an ordinary expression */
74311 pItem->iOrderByCol = 0;
74312 if( sqlite3ResolveExprNames(pNC, pE) ){
74313 return 1;
 
 
 
 
 
74314 }
74315 }
74316 return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);
74317 }
74318
@@ -102256,11 +102261,11 @@
102256 Table *pTab,
102257 Module *pMod,
102258 int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
102259 char **pzErr
102260 ){
102261 VtabCtx sCtx;
102262 VTable *pVTable;
102263 int rc;
102264 const char *const*azArg = (const char *const*)pTab->azModuleArg;
102265 int nArg = pTab->nModuleArg;
102266 char *zErr = 0;
@@ -102281,13 +102286,14 @@
102281 /* Invoke the virtual table constructor */
102282 assert( &db->pVtabCtx );
102283 assert( xConstruct );
102284 sCtx.pTab = pTab;
102285 sCtx.pVTable = pVTable;
 
102286 db->pVtabCtx = &sCtx;
102287 rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
102288 db->pVtabCtx = 0;
102289 if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
102290
102291 if( SQLITE_OK!=rc ){
102292 if( zErr==0 ){
102293 *pzErr = sqlite3MPrintf(db, "vtable constructor failed: %s", zModuleName);
102294
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -657,11 +657,11 @@
657 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
658 ** [sqlite_version()] and [sqlite_source_id()].
659 */
660 #define SQLITE_VERSION "3.7.12"
661 #define SQLITE_VERSION_NUMBER 3007012
662 #define SQLITE_SOURCE_ID "2012-05-01 14:21:57 bfa61e781cb442be641486e7e55a1518e888d830"
663
664 /*
665 ** CAPI3REF: Run-Time Library Version Numbers
666 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
667 **
@@ -41583,11 +41583,11 @@
41583 ** They will never be read by any client. So remove them from the pDirty
41584 ** list here. */
41585 PgHdr *p;
41586 PgHdr **ppNext = &pList;
41587 nList = 0;
41588 for(p=pList; (*ppNext = p)!=0; p=p->pDirty){
41589 if( p->pgno<=nTruncate ){
41590 ppNext = &p->pDirty;
41591 nList++;
41592 }
41593 }
@@ -74273,11 +74273,11 @@
74273 NameContext *pNC, /* The name context of the SELECT statement */
74274 Select *pSelect, /* The SELECT statement holding pOrderBy */
74275 ExprList *pOrderBy, /* An ORDER BY or GROUP BY clause to resolve */
74276 const char *zType /* Either "ORDER" or "GROUP", as appropriate */
74277 ){
74278 int i, j; /* Loop counters */
74279 int iCol; /* Column number */
74280 struct ExprList_item *pItem; /* A term of the ORDER BY clause */
74281 Parse *pParse; /* Parsing context */
74282 int nResult; /* Number of terms in the result set */
74283
@@ -74309,10 +74309,15 @@
74309
74310 /* Otherwise, treat the ORDER BY term as an ordinary expression */
74311 pItem->iOrderByCol = 0;
74312 if( sqlite3ResolveExprNames(pNC, pE) ){
74313 return 1;
74314 }
74315 for(j=0; j<pSelect->pEList->nExpr; j++){
74316 if( sqlite3ExprCompare(pE, pSelect->pEList->a[j].pExpr)==0 ){
74317 pItem->iOrderByCol = j+1;
74318 }
74319 }
74320 }
74321 return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);
74322 }
74323
@@ -102256,11 +102261,11 @@
102261 Table *pTab,
102262 Module *pMod,
102263 int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
102264 char **pzErr
102265 ){
102266 VtabCtx sCtx, *pPriorCtx;
102267 VTable *pVTable;
102268 int rc;
102269 const char *const*azArg = (const char *const*)pTab->azModuleArg;
102270 int nArg = pTab->nModuleArg;
102271 char *zErr = 0;
@@ -102281,13 +102286,14 @@
102286 /* Invoke the virtual table constructor */
102287 assert( &db->pVtabCtx );
102288 assert( xConstruct );
102289 sCtx.pTab = pTab;
102290 sCtx.pVTable = pVTable;
102291 pPriorCtx = db->pVtabCtx;
102292 db->pVtabCtx = &sCtx;
102293 rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
102294 db->pVtabCtx = pPriorCtx;
102295 if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
102296
102297 if( SQLITE_OK!=rc ){
102298 if( zErr==0 ){
102299 *pzErr = sqlite3MPrintf(db, "vtable constructor failed: %s", zModuleName);
102300
+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.12"
111111
#define SQLITE_VERSION_NUMBER 3007012
112
-#define SQLITE_SOURCE_ID "2012-04-24 13:14:49 dfce8569765614462a3952d1761c10d579984665"
112
+#define SQLITE_SOURCE_ID "2012-05-01 14:21:57 bfa61e781cb442be641486e7e55a1518e888d830"
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.12"
111 #define SQLITE_VERSION_NUMBER 3007012
112 #define SQLITE_SOURCE_ID "2012-04-24 13:14:49 dfce8569765614462a3952d1761c10d579984665"
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.12"
111 #define SQLITE_VERSION_NUMBER 3007012
112 #define SQLITE_SOURCE_ID "2012-05-01 14:21:57 bfa61e781cb442be641486e7e55a1518e888d830"
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