diff options
Diffstat (limited to 'src/wal.c')
-rw-r--r-- | src/wal.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2009,9 +2009,10 @@ static int walCheckpoint( sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_CKPT_START, 0); rc = sqlite3OsFileSize(pWal->pDbFd, &nSize); if( rc==SQLITE_OK && nSize<nReq ){ - if( (nSize+(i64)pWal->hdr.mxFrame*szPage)<nReq ){ + if( (nSize+65536+(i64)pWal->hdr.mxFrame*szPage)<nReq ){ /* If the size of the final database is larger than the current - ** database plus the amount of data in the wal file, then there + ** database plus the amount of data in the wal file, plus the + ** maximum size of the pending-byte page (65536 bytes), then ** must be corruption somewhere. */ rc = SQLITE_CORRUPT_BKPT; }else{ |