mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a bug in sqlite3_snapshot_recover() that could cause subsequent read
transactions to use out-of-data cache entries. FossilOrigin-Name: 9abeb7980a34cec11a3420e14ad98a4ec0d9c599
This commit is contained in:
@@ -2432,7 +2432,12 @@ int sqlite3WalSnapshotRecover(Wal *pWal){
|
||||
walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);
|
||||
}
|
||||
|
||||
/* End the read transaction opened above. Also zero the cache of the
|
||||
** wal-index header to force the pager-cache to be flushed when the next
|
||||
** read transaction is open, as it may not match the current contents of
|
||||
** pWal->hdr. */
|
||||
sqlite3WalEndReadTransaction(pWal);
|
||||
memset(&pWal->hdr, 0, sizeof(WalIndexHdr));
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user