aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-06-01 13:17:44 +0000
committerdrh <drh@noemail.net>2010-06-01 13:17:44 +0000
commitf77bbd9fc58d9ad2122497f222054aecfed697d2 (patch)
tree65c625bac843c02560b15cfab62aef79d0e0ad9a /src
parent9c1564779e367e501e425342eee6eb57a1804d4c (diff)
downloadsqlite-f77bbd9fc58d9ad2122497f222054aecfed697d2.tar.gz
sqlite-f77bbd9fc58d9ad2122497f222054aecfed697d2.zip
Fix a bug introduced by the previous check-in but only seen if
SQLITE_ENABLE_EXPENSIVE_ASSERTS is turned on. FossilOrigin-Name: 9c9ec8994bf701249efce6c7bb911de4525808c8
Diffstat (limited to 'src')
-rw-r--r--src/wal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wal.c b/src/wal.c
index 48b9c04b5..dbac31ae3 100644
--- 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++){