aboutsummaryrefslogtreecommitdiff
path: root/src/wal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wal.c')
-rw-r--r--src/wal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wal.c b/src/wal.c
index 0ef08b137..ac0a03e93 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -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{