summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2010-09-06 15:26:43 +0200
committerAndreas Baumann <abaumann@yahoo.com>2010-09-06 15:26:43 +0200
commite10a5727f4178d6e31b252e49389b7dd86bdbbc4 (patch)
tree6aaf44c30fd74ff0f62bbeba6fcbe37952863ebc
parentbe37b80bf42b4547991f59dad55c295570318d61 (diff)
downloadsqlitexx-e10a5727f4178d6e31b252e49389b7dd86bdbbc4.tar.gz
sqlitexx-e10a5727f4178d6e31b252e49389b7dd86bdbbc4.tar.bz2
updated sqlite on windows from 3.7.1 to 3.7.2
-rw-r--r--makefiles/nmake/config.mk2
-rw-r--r--sqlite-3.7.2/Makefile.W32 (renamed from sqlite-3.7.1/Makefile.W32)0
-rw-r--r--sqlite-3.7.2/sqlite3.c (renamed from sqlite-3.7.1/sqlite3.c)54
-rw-r--r--sqlite-3.7.2/sqlite3.h (renamed from sqlite-3.7.1/sqlite3.h)6
-rw-r--r--sqlite-3.7.2/sqlite3ext.h (renamed from sqlite-3.7.1/sqlite3ext.h)0
5 files changed, 38 insertions, 24 deletions
diff --git a/makefiles/nmake/config.mk b/makefiles/nmake/config.mk
index f9767ae..1d3b285 100644
--- a/makefiles/nmake/config.mk
+++ b/makefiles/nmake/config.mk
@@ -21,4 +21,4 @@ PLATFORM_SDK_DIR = C:\Program Files\Microsoft Platform SDK for Windows Server 20
# version of the sqlite3 library (amalgamation, is included as subdir)
-SQLITE_VERSION=3.7.1
+SQLITE_VERSION=3.7.2
diff --git a/sqlite-3.7.1/Makefile.W32 b/sqlite-3.7.2/Makefile.W32
index 5bb8070..5bb8070 100644
--- a/sqlite-3.7.1/Makefile.W32
+++ b/sqlite-3.7.2/Makefile.W32
diff --git a/sqlite-3.7.1/sqlite3.c b/sqlite-3.7.2/sqlite3.c
index be7e5f1..695de18 100644
--- a/sqlite-3.7.1/sqlite3.c
+++ b/sqlite-3.7.2/sqlite3.c
@@ -1,6 +1,6 @@
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.7.1. By combining all the individual C code files into this
+** version 3.7.2. 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
@@ -644,9 +644,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.7.1"
-#define SQLITE_VERSION_NUMBER 3007001
-#define SQLITE_SOURCE_ID "2010-08-21 16:01:46 3613b0695a5e990905ab146fadcab34dd04d5874"
+#define SQLITE_VERSION "3.7.2"
+#define SQLITE_VERSION_NUMBER 3007002
+#define SQLITE_SOURCE_ID "2010-08-23 18:52:01 42537b60566f288167f1b5864a5435986838e3a3"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -35312,13 +35312,14 @@ static void pager_set_pagehash(PgHdr *pPage){
#define CHECK_PAGE(x) checkPage(x)
static void checkPage(PgHdr *pPg){
Pager *pPager = pPg->pPager;
- assert( !pPg->pageHash || pPager->errCode
- || (pPg->flags&PGHDR_DIRTY) || pPg->pageHash==pager_pagehash(pPg) );
+ assert( pPager->eState!=PAGER_ERROR );
+ assert( (pPg->flags&PGHDR_DIRTY) || pPg->pageHash==pager_pagehash(pPg) );
}
#else
#define pager_datahash(X,Y) 0
#define pager_pagehash(X) 0
+#define pager_set_pagehash(X)
#define CHECK_PAGE(x)
#endif /* SQLITE_CHECK_PAGES */
@@ -36088,11 +36089,19 @@ static int pager_end_transaction(Pager *pPager, int hasMaster){
rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
}
}
+ }
#ifdef SQLITE_CHECK_PAGES
- sqlite3PcacheIterateDirty(pPager->pPCache, pager_set_pagehash);
-#endif
+ sqlite3PcacheIterateDirty(pPager->pPCache, pager_set_pagehash);
+ if( pPager->dbSize==0 && sqlite3PcacheRefCount(pPager->pPCache)>0 ){
+ PgHdr *p = pager_lookup(pPager, 1);
+ if( p ){
+ p->pageHash = 0;
+ sqlite3PagerUnref(p);
+ }
}
+#endif
+
sqlite3BitvecDestroy(pPager->pInJournal);
pPager->pInJournal = 0;
pPager->nRec = 0;
@@ -36439,9 +36448,8 @@ static int pager_playback_one_page(
assert( !pagerUseWal(pPager) );
sqlite3PcacheMakeClean(pPg);
}
-#ifdef SQLITE_CHECK_PAGES
- pPg->pageHash = pager_pagehash(pPg);
-#endif
+ pager_set_pagehash(pPg);
+
/* If this was page 1, then restore the value of Pager.dbFileVers.
** Do this before any decoding. */
if( pgno==1 ){
@@ -37080,6 +37088,14 @@ static int pagerWalFrames(
sqlite3BackupUpdate(pPager->pBackup, p->pgno, (u8 *)p->pData);
}
}
+
+#ifdef SQLITE_CHECK_PAGES
+ {
+ PgHdr *p;
+ for(p=pList; p; p=p->pDirty) pager_set_pagehash(p);
+ }
+#endif
+
return rc;
}
@@ -38098,9 +38114,7 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
}else{
PAGERTRACE(("NOSTORE %d page %d\n", PAGERID(pPager), pgno));
}
-#ifdef SQLITE_CHECK_PAGES
- pList->pageHash = pager_pagehash(pList);
-#endif
+ pager_set_pagehash(pList);
pList = pList->pDirty;
}
@@ -39088,9 +39102,7 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
goto pager_acquire_err;
}
}
-#ifdef SQLITE_CHECK_PAGES
- pPg->pageHash = pager_pagehash(pPg);
-#endif
+ pager_set_pagehash(pPg);
}
return SQLITE_OK;
@@ -39588,9 +39600,7 @@ SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){
PAGERTRACE(("DONT_WRITE page %d of %d\n", pPg->pgno, PAGERID(pPager)));
IOTRACE(("CLEAN %p %d\n", pPager, pPg->pgno))
pPg->flags |= PGHDR_DONT_WRITE;
-#ifdef SQLITE_CHECK_PAGES
- pPg->pageHash = pager_pagehash(pPg);
-#endif
+ pager_set_pagehash(pPg);
}
}
@@ -49329,6 +49339,10 @@ static int allocateBtreePage(
if( !pPrevTrunk ){
memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
}else{
+ rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);
+ if( rc!=SQLITE_OK ){
+ goto end_allocate_page;
+ }
memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
}
}else{
diff --git a/sqlite-3.7.1/sqlite3.h b/sqlite-3.7.2/sqlite3.h
index b831fe5..ceca47a 100644
--- a/sqlite-3.7.1/sqlite3.h
+++ b/sqlite-3.7.2/sqlite3.h
@@ -107,9 +107,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.7.1"
-#define SQLITE_VERSION_NUMBER 3007001
-#define SQLITE_SOURCE_ID "2010-08-21 16:01:46 3613b0695a5e990905ab146fadcab34dd04d5874"
+#define SQLITE_VERSION "3.7.2"
+#define SQLITE_VERSION_NUMBER 3007002
+#define SQLITE_SOURCE_ID "2010-08-23 18:52:01 42537b60566f288167f1b5864a5435986838e3a3"
/*
** CAPI3REF: Run-Time Library Version Numbers
diff --git a/sqlite-3.7.1/sqlite3ext.h b/sqlite-3.7.2/sqlite3ext.h
index 0d37bbe..0d37bbe 100644
--- a/sqlite-3.7.1/sqlite3ext.h
+++ b/sqlite-3.7.2/sqlite3ext.h