diff options
author | dan <dan@noemail.net> | 2010-04-30 16:50:00 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2010-04-30 16:50:00 +0000 |
commit | c9d53dbe5a232b81f33cabff27746a1052264edd (patch) | |
tree | f1380f6bf917526546074d10de56e526c45eb1c1 /src | |
parent | 400df2ea70f47060dd8c30852931b32d994881da (diff) | |
download | sqlite-c9d53dbe5a232b81f33cabff27746a1052264edd.tar.gz sqlite-c9d53dbe5a232b81f33cabff27746a1052264edd.zip |
Fix a problem with calculating the required size of the wal-index when appending frames.
FossilOrigin-Name: 9526b11130f3ed2f5227386a26263c767214603a
Diffstat (limited to 'src')
-rw-r--r-- | src/wal.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -433,9 +433,9 @@ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){ u32 iSlot = walIndexEntry(iFrame); walIndexMap(pWal, -1); - while( (iSlot+128)>=pWal->szWIndex ){ + while( ((iSlot+128)*sizeof(u32))>=pWal->szWIndex ){ int rc; - int nByte = pWal->szWIndex*4 + WALINDEX_MMAP_INCREMENT; + int nByte = pWal->szWIndex + WALINDEX_MMAP_INCREMENT; /* Enlarge the storage, then remap it. */ rc = walIndexRemap(pWal, nByte); |