]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Another minor fix to checkpoint on the WAL branch.
authordan <dan@noemail.net>
Mon, 31 May 2010 12:02:30 +0000 (12:02 +0000)
committerdan <dan@noemail.net>
Mon, 31 May 2010 12:02:30 +0000 (12:02 +0000)
FossilOrigin-Name: 853f1e3f7720af2723b552bdf086bb106e6e93fe

manifest
manifest.uuid
src/wal.c

index fd503a559523397029d69af9543b8cd48899935c..f16c9e92a4aabbf75cb02f6693155c8fefcb5ca3 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sbug\sin\scheckpoint\sintroduced\sby\s[181ceb32ea].
-D 2010-05-31T11:39:54
+C Another\sminor\sfix\sto\scheckpoint\son\sthe\sWAL\sbranch.
+D 2010-05-31T12:02:31
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -224,7 +224,7 @@ F src/vdbeblob.c 5327132a42a91e8b7acfb60b9d2c3b1c5c863e0e
 F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1
 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
 F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda
-F src/wal.c e7dcdd7ac97301a9f8550ba25842959e9eca7c53
+F src/wal.c ae5ff8e4dacef83bdb3ef724aed521b0b7099009
 F src/wal.h 1c1c9feb629b7f4afcbe0b47f80f47c5551d3a02
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356
@@ -815,7 +815,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 181ceb32ead7f540a7c6437f53a5b0f3e78162db
-R 5b2efbc364d42c3e87c8f8e6c9af7dc3
+P b499dbc88a67b4200b5f527be88be4ac90f7043f
+R 8b2822c04a077192242cb1cc9fb013c5
 U dan
-Z 846280efab83efdd590118c7ffb7a0dc
+Z ea3b19fcc0f2d8c43d059369744c24bb
index 336f2e0275201eb899661a1d42fa30a6df22f8c6..10b0267614d22feccf76b6ab7e300ab8f78a94bb 100644 (file)
@@ -1 +1 @@
-b499dbc88a67b4200b5f527be88be4ac90f7043f
\ No newline at end of file
+853f1e3f7720af2723b552bdf086bb106e6e93fe
\ No newline at end of file
index 81eb557beb96a0c2c0086a0b1027dd20e5ddfe65..7d3acd130e1ba34b7f5e10b17435febd357c7996 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -1232,7 +1232,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
   ** running (or, indeed, while the WalIterator object exists).  Hence,
   ** we can cast off the volatile qualifacation from shared memory
   */
-  assert( pWal->ckptLock || pWal->exclusiveMode );
+  assert( pWal->ckptLock );
   aData = (u32*)pWal->pWiData;
 
   /* Allocate space for the WalIterator object */
@@ -1427,7 +1427,7 @@ int sqlite3WalClose(
     rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE);
     if( rc==SQLITE_OK ){
       pWal->exclusiveMode = 1;
-      rc = walCheckpoint(pWal, sync_flags, nBuf, zBuf);
+      rc = sqlite3WalCheckpoint(pWal, sync_flags, nBuf, zBuf);
       if( rc==SQLITE_OK ){
         isDelete = 1;
       }
@@ -1491,9 +1491,11 @@ int walIndexTryHdr(Wal *pWal, int *pChanged){
   if( memcmp(&h1, &h2, sizeof(h1))!=0 ){
     return 1;   /* Dirty read */
   }  
+#if 0
   if( h1.szPage==0 ){
     return 1;   /* Malformed header - probably all zeros */
   }
+#endif
   walChecksumBytes(1, (u8*)&h1, sizeof(h1)-sizeof(h1.aCksum), 0, aCksum);
   if( aCksum[0]!=h1.aCksum[0] || aCksum[1]!=h1.aCksum[1] ){
     return 1;   /* Checksum does not match */