]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Relax an over-zealous assert() in sqlite3WalUndo().
authordrh <drh@noemail.net>
Tue, 4 May 2010 17:20:09 +0000 (17:20 +0000)
committerdrh <drh@noemail.net>
Tue, 4 May 2010 17:20:09 +0000 (17:20 +0000)
FossilOrigin-Name: 8f9d22d58c75ad7476c1eea8ba296347e30b7beb

manifest
manifest.uuid
src/wal.c

index 1551534cda7ec0f73a9c6fba9abac408c7dc0704..20f9ac5fefc5993d00806af7d999d4090246ac7d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Take\scare\snot\sto\sinvoke\sthe\sxShmClose\smethod\sof\sthe\sVFS\swith\sa\sNULL\s\nshared\smemory\sobject.
-D 2010-05-04T16:33:38
+C Relax\san\sover-zealous\sassert()\sin\ssqlite3WalUndo().
+D 2010-05-04T17:20:09
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in d83a0ffef3dcbfb08b410a6c6dd6c009ec9167fb
 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 7f5d355cee4e3e7388f8abc1a34c131c46b693aa
+F src/wal.c 864f1e2036eb9e0131287e3ebe53e69990e19b7f
 F src/wal.h b4c42014b5fa3b4e6244ac8c65de7ff67adeb27c
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356
@@ -812,14 +812,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P c2bf693f933313991d85394009e79a7903037a18
-R 66f52b79291a06333c330de7251fee7d
+P 1465d3842c52aa7471f63deb47fe5b256d4e01c2
+R c0c153d254f17743fb5d4241f139732d
 U drh
-Z 927b5dbd39ea7c4afbefd93b2669db7e
+Z 37e1a86378a1623d112f18783b7915ac
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFL4ExkoxKgR168RlERAs5HAJ4/lJHDDYoHFsKzUU6xoGqpUum/jACdEGQu
-hHBRmOLcDhAHMWw3gl463l0=
-=7r+U
+iD8DBQFL4FdSoxKgR168RlERAsJoAJ4grLIIql2W9tFYnBXach9uwbQ4uwCeONqc
+SqAXE6WVtdXxSlF/T06Hf0s=
+=HALZ
 -----END PGP SIGNATURE-----
index 3745f29224fa3ecda9bc240982c8d093a0a03c33..6bbe6858282240ef93911f18aab502e9c72f47cc 100644 (file)
@@ -1 +1 @@
-1465d3842c52aa7471f63deb47fe5b256d4e01c2
\ No newline at end of file
+8f9d22d58c75ad7476c1eea8ba296347e30b7beb
\ No newline at end of file
index 9db1ca86cc871f6970c10288062334afb18ccbf3..7ea6916d6327a97eb93b93804df0b91c4d83e73d 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -1076,8 +1076,6 @@ int sqlite3WalWriteLock(Wal *pWal, int op){
 }
 
 /*
-** The Wal object passed to this function must be holding the write-lock.
-**
 ** If any data has been written (but not committed) to the log file, this
 ** function moves the write-pointer back to the start of the transaction.
 **
@@ -1094,9 +1092,9 @@ int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx){
   Pgno iMax = pWal->hdr.iLastPg;
   Pgno iFrame;
 
-  assert( pWal->lockState==SQLITE_SHM_WRITE );
   walIndexReadHdr(pWal, 0);
   for(iFrame=pWal->hdr.iLastPg+1; iFrame<=iMax && rc==SQLITE_OK; iFrame++){
+    assert( pWal->lockState==SQLITE_SHM_WRITE );
     rc = xUndo(pUndoCtx, pWal->pWiData[walIndexEntry(iFrame)]);
   }
   walIndexUnmap(pWal);