[libgda] Switched to SQLite version 3.7.0.1
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Switched to SQLite version 3.7.0.1
- Date: Wed, 4 Aug 2010 17:50:05 +0000 (UTC)
commit ae17b0124e754253ca817b1cbb3d82b07b281b74
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Aug 4 19:36:12 2010 +0200
Switched to SQLite version 3.7.0.1
libgda/sqlite/sqlite-src/PragmasPatch | 6 ++--
libgda/sqlite/sqlite-src/sqlite3.c | 36 +++++++++++++++++++++++++-------
libgda/sqlite/sqlite-src/sqlite3.h | 4 +-
3 files changed, 33 insertions(+), 13 deletions(-)
---
diff --git a/libgda/sqlite/sqlite-src/PragmasPatch b/libgda/sqlite/sqlite-src/PragmasPatch
index 8daefa1..11136f4 100644
--- a/libgda/sqlite/sqlite-src/PragmasPatch
+++ b/libgda/sqlite/sqlite-src/PragmasPatch
@@ -1,6 +1,6 @@
---- sqlite3.c.orig 2010-07-21 20:54:06.000000000 +0200
-+++ sqlite3.c 2010-07-28 17:43:38.000000000 +0200
-@@ -84197,6 +84197,60 @@
+--- sqlite3.c.orig 2010-08-04 18:07:48.000000000 +0200
++++ sqlite3.c 2010-08-04 19:31:59.000000000 +0200
+@@ -84217,6 +84217,60 @@
#ifndef SQLITE_OMIT_SCHEMA_PRAGMAS
/*
diff --git a/libgda/sqlite/sqlite-src/sqlite3.c b/libgda/sqlite/sqlite-src/sqlite3.c
index f46b46c..8df34a2 100644
--- a/libgda/sqlite/sqlite-src/sqlite3.c
+++ b/libgda/sqlite/sqlite-src/sqlite3.c
@@ -1,6 +1,6 @@
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.7.0. By combining all the individual C code files into this
+** version 3.7.0.1. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a one translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
@@ -643,9 +643,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.7.0"
+#define SQLITE_VERSION "3.7.0.1"
#define SQLITE_VERSION_NUMBER 3007000
-#define SQLITE_SOURCE_ID "2010-07-21 16:16:28 b36b105eab6fd3195f4bfba6cb5cda0f063b7460"
+#define SQLITE_SOURCE_ID "2010-08-04 12:31:11 042a1abb030a0711386add7eb6e10832cc8b0f57"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -21893,7 +21893,7 @@ static int os2Open(
memset( pFile, 0, sizeof(*pFile) );
- OSTRACE( "OPEN want %d\n", flags ));
+ OSTRACE(( "OPEN want %d\n", flags ));
if( flags & SQLITE_OPEN_READWRITE ){
ulOpenMode |= OPEN_ACCESS_READWRITE;
@@ -46250,13 +46250,27 @@ SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
if( p->inTrans>pBt->inTransaction ){
pBt->inTransaction = p->inTrans;
}
-#ifndef SQLITE_OMIT_SHARED_CACHE
if( wrflag ){
+ MemPage *pPage1 = pBt->pPage1;
+#ifndef SQLITE_OMIT_SHARED_CACHE
assert( !pBt->pWriter );
pBt->pWriter = p;
pBt->isExclusive = (u8)(wrflag>1);
- }
#endif
+
+ /* If the db-size header field is incorrect (as it may be if an old
+ ** client has been writing the database file), update it now. Doing
+ ** this sooner rather than later means the database size can safely
+ ** re-read the database size from page 1 if a savepoint or transaction
+ ** rollback occurs within the transaction.
+ */
+ if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
+ rc = sqlite3PagerWrite(pPage1->pDbPage);
+ if( rc==SQLITE_OK ){
+ put4byte(&pPage1->aData[28], pBt->nPage);
+ }
+ }
+ }
}
@@ -68264,14 +68278,20 @@ SQLITE_PRIVATE int sqlite3FindInIndex(Parse *pParse, Expr *pX, int *prNotFound){
/* Could not found an existing table or index to use as the RHS b-tree.
** We will have to generate an ephemeral table to do the job.
*/
+ double savedNQueryLoop = pParse->nQueryLoop;
int rMayHaveNull = 0;
eType = IN_INDEX_EPH;
if( prNotFound ){
*prNotFound = rMayHaveNull = ++pParse->nMem;
- }else if( pX->pLeft->iColumn<0 && !ExprHasAnyProperty(pX, EP_xIsSelect) ){
- eType = IN_INDEX_ROWID;
+ }else{
+ testcase( pParse->nQueryLoop>(double)1 );
+ pParse->nQueryLoop = (double)1;
+ if( pX->pLeft->iColumn<0 && !ExprHasAnyProperty(pX, EP_xIsSelect) ){
+ eType = IN_INDEX_ROWID;
+ }
}
sqlite3CodeSubselect(pParse, pX, rMayHaveNull, eType==IN_INDEX_ROWID);
+ pParse->nQueryLoop = savedNQueryLoop;
}else{
pX->iTable = iTab;
}
diff --git a/libgda/sqlite/sqlite-src/sqlite3.h b/libgda/sqlite/sqlite-src/sqlite3.h
index 2404a45..3d02c7c 100644
--- a/libgda/sqlite/sqlite-src/sqlite3.h
+++ b/libgda/sqlite/sqlite-src/sqlite3.h
@@ -107,9 +107,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.7.0"
+#define SQLITE_VERSION "3.7.0.1"
#define SQLITE_VERSION_NUMBER 3007000
-#define SQLITE_SOURCE_ID "2010-07-21 16:16:28 b36b105eab6fd3195f4bfba6cb5cda0f063b7460"
+#define SQLITE_SOURCE_ID "2010-08-04 12:31:11 042a1abb030a0711386add7eb6e10832cc8b0f57"
/*
** CAPI3REF: Run-Time Library Version Numbers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]