Fix a bug introduced by the previous check-in but only seen if

SQLITE_ENABLE_EXPENSIVE_ASSERTS is turned on.

FossilOrigin-Name: 9c9ec8994bf701249efce6c7bb911de4525808c8
This commit is contained in:
drh 2010-06-01 13:17:44 +00:00
parent 9c1564779e
commit f77bbd9fc5
3 changed files with 12 additions and 12 deletions

View File

@ -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-----

View File

@ -1 +1 @@
f039552e6330b6a04281748f985b41937f534bd0
9c9ec8994bf701249efce6c7bb911de4525808c8

View File

@ -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++){