mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-04 04:42:17 +03:00
Fix a problem with calculating the required size of the wal-index when appending frames.
FossilOrigin-Name: 9526b11130f3ed2f5227386a26263c767214603a
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user