mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Avoid writing frames with no checksums into the wal file if a savepoint is rolled back after dirty pages have already been spilled into the wal file. Possible fix for [forum:/forumpost/b490f726db | forum post b490f726db].
FossilOrigin-Name: 3a3269fe8e925a522d5df9f011220a842fb15a9f56e785884e32d2e15abda5bb
This commit is contained in:
@@ -3781,6 +3781,7 @@ int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx){
|
||||
if( iMax!=pWal->hdr.mxFrame ) walCleanupHash(pWal);
|
||||
}
|
||||
SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )
|
||||
pWal->iReCksum = 0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
@@ -3828,6 +3829,9 @@ int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
|
||||
walCleanupHash(pWal);
|
||||
}
|
||||
SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; )
|
||||
if( pWal->iReCksum>pWal->hdr.mxFrame ){
|
||||
pWal->iReCksum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user