]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a bug introduced by the previous check-in but only seen if
authordrh <drh@noemail.net>
Tue, 1 Jun 2010 13:17:44 +0000 (13:17 +0000)
committerdrh <drh@noemail.net>
Tue, 1 Jun 2010 13:17:44 +0000 (13:17 +0000)
SQLITE_ENABLE_EXPENSIVE_ASSERTS is turned on.

FossilOrigin-Name: 9c9ec8994bf701249efce6c7bb911de4525808c8

manifest
manifest.uuid
src/wal.c

index c429dfe94fee98bdbf2520ddc93e1a18cec1fc08..10a80215b05a3ef5fd0076b41000525ee4eb3e4f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Fix\san\soff-by-one\sboundary-value\sissue\sin\swalCleanupHash().
-D 2010-06-01T12:58:41
+C Fix\sa\sbug\sintroduced\sby\sthe\sprevious\scheck-in\sbut\sonly\sseen\sif\nSQLITE_ENABLE_EXPENSIVE_ASSERTS\sis\sturned\son.
+D 2010-06-01T13:17:44
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -227,7 +227,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 2a122212dcf4c3955f0c481423d1229f2de243c5
+F src/wal.c 131a5eaa59935cb3792ceed95a2b161a862c63f6
 F src/wal.h 1c1c9feb629b7f4afcbe0b47f80f47c5551d3a02
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 75fee9e255b62f773fcadd1d1f25b6f63ac7a356
@@ -818,14 +818,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 9622dd468c8914262e9d8bd8dbca9e22ec6ee75c
-R 2027cf2e3628664b2b4aeae9063b73e6
+P f039552e6330b6a04281748f985b41937f534bd0
+R 6598ae3f99b7aa3625a351066760e43c
 U drh
-Z 6523cefeaece12ca468a422414c222b4
+Z 46dc844402f0088130b5572c3b57f1cf
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFMBQQFoxKgR168RlERArWrAJkB9UGjRw3tmehhDr5P1HYBMojm4gCfca8+
-OpbJgYgS2VEE4rPB1ieyWGg=
-=X2Kt
+iD8DBQFMBQh7oxKgR168RlERAkq1AJ9w0OmI7L6S4kifZ38AIWx8+iYOqACeJ/Es
+6ulVh2nHwt7VRotuY8c8O6c=
+=6tyV
 -----END PGP SIGNATURE-----
index 0d9463041f7bc1dced77db0850771debb02c6cbe..277cf1f92fa3f96fba20dd86df0c8584ea0e6a60 100644 (file)
@@ -1 +1 @@
-f039552e6330b6a04281748f985b41937f534bd0
\ No newline at end of file
+9c9ec8994bf701249efce6c7bb911de4525808c8
\ No newline at end of file
index 48b9c04b5fd4975eb55a6051098e663904143bfa..dbac31ae3507e8dfe5e6334f4edac8303f44c448 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -819,7 +819,7 @@ static void walCleanupHash(Wal *pWal){
   volatile HASHTABLE_DATATYPE *aHash;  /* Pointer to hash table to clear */
   volatile u32 *aPgno;                 /* Unused return from walHashFind() */
   u32 iZero;                           /* frame == (aHash[x]+iZero) */
-  int iLimit;                          /* Zero values greater than this */
+  int iLimit = 0;                      /* Zero values greater than this */
 
   assert( pWal->writeLock );
   testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE-1 );
@@ -850,7 +850,7 @@ static void walCleanupHash(Wal *pWal){
   /* Verify that the every entry in the mapping region is still reachable
   ** via the hash table even after the cleanup.
   */
-  {
+  if( iLimit ){
     int i;           /* Loop counter */
     int iKey;        /* Hash key */
     for(i=1; i<=iLimit; i++){