1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Another minor fix to checkpoint on the WAL branch.

FossilOrigin-Name: 853f1e3f7720af2723b552bdf086bb106e6e93fe
This commit is contained in:
dan
2010-05-31 12:02:30 +00:00
parent 0cc5b2b6c6
commit 1beb939db1
3 changed files with 11 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\sbug\sin\scheckpoint\sintroduced\sby\s[181ceb32ea]. C Another\sminor\sfix\sto\scheckpoint\son\sthe\sWAL\sbranch.
D 2010-05-31T11:39:54 D 2010-05-31T12:02:31
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -224,7 +224,7 @@ F src/vdbeblob.c 5327132a42a91e8b7acfb60b9d2c3b1c5c863e0e
F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1 F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1
F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda
F src/wal.c e7dcdd7ac97301a9f8550ba25842959e9eca7c53 F src/wal.c ae5ff8e4dacef83bdb3ef724aed521b0b7099009
F src/wal.h 1c1c9feb629b7f4afcbe0b47f80f47c5551d3a02 F src/wal.h 1c1c9feb629b7f4afcbe0b47f80f47c5551d3a02
F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356 F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356
@@ -815,7 +815,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 181ceb32ead7f540a7c6437f53a5b0f3e78162db P b499dbc88a67b4200b5f527be88be4ac90f7043f
R 5b2efbc364d42c3e87c8f8e6c9af7dc3 R 8b2822c04a077192242cb1cc9fb013c5
U dan U dan
Z 846280efab83efdd590118c7ffb7a0dc Z ea3b19fcc0f2d8c43d059369744c24bb

View File

@@ -1 +1 @@
b499dbc88a67b4200b5f527be88be4ac90f7043f 853f1e3f7720af2723b552bdf086bb106e6e93fe

View File

@@ -1232,7 +1232,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
** running (or, indeed, while the WalIterator object exists). Hence, ** running (or, indeed, while the WalIterator object exists). Hence,
** we can cast off the volatile qualifacation from shared memory ** we can cast off the volatile qualifacation from shared memory
*/ */
assert( pWal->ckptLock || pWal->exclusiveMode ); assert( pWal->ckptLock );
aData = (u32*)pWal->pWiData; aData = (u32*)pWal->pWiData;
/* Allocate space for the WalIterator object */ /* Allocate space for the WalIterator object */
@@ -1427,7 +1427,7 @@ int sqlite3WalClose(
rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE); rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
pWal->exclusiveMode = 1; pWal->exclusiveMode = 1;
rc = walCheckpoint(pWal, sync_flags, nBuf, zBuf); rc = sqlite3WalCheckpoint(pWal, sync_flags, nBuf, zBuf);
if( rc==SQLITE_OK ){ if( rc==SQLITE_OK ){
isDelete = 1; isDelete = 1;
} }
@@ -1491,9 +1491,11 @@ int walIndexTryHdr(Wal *pWal, int *pChanged){
if( memcmp(&h1, &h2, sizeof(h1))!=0 ){ if( memcmp(&h1, &h2, sizeof(h1))!=0 ){
return 1; /* Dirty read */ return 1; /* Dirty read */
} }
#if 0
if( h1.szPage==0 ){ if( h1.szPage==0 ){
return 1; /* Malformed header - probably all zeros */ return 1; /* Malformed header - probably all zeros */
} }
#endif
walChecksumBytes(1, (u8*)&h1, sizeof(h1)-sizeof(h1.aCksum), 0, aCksum); walChecksumBytes(1, (u8*)&h1, sizeof(h1)-sizeof(h1.aCksum), 0, aCksum);
if( aCksum[0]!=h1.aCksum[0] || aCksum[1]!=h1.aCksum[1] ){ if( aCksum[0]!=h1.aCksum[0] || aCksum[1]!=h1.aCksum[1] ){
return 1; /* Checksum does not match */ return 1; /* Checksum does not match */