mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
If an error occurs while writing frames to the log to commit a transaction, do not mark the pages as clean in the cache. Otherwise, the subsequent rollback does not roll them back (leaving the client to continue with a cache that makes it appear that the transaction was committed - inconsistent with the database on disk).
FossilOrigin-Name: cb571c1b71a37b3a10d640987c77a6eec508235d
This commit is contained in:
@@ -5082,7 +5082,9 @@ int sqlite3PagerCommitPhaseOne(
|
||||
(pPager->fullSync ? pPager->sync_flags : 0)
|
||||
);
|
||||
}
|
||||
sqlite3PcacheCleanAll(pPager->pPCache);
|
||||
if( rc==SQLITE_OK ){
|
||||
sqlite3PcacheCleanAll(pPager->pPCache);
|
||||
}
|
||||
}else{
|
||||
/* The following block updates the change-counter. Exactly how it
|
||||
** does this depends on whether or not the atomic-update optimization
|
||||
|
Reference in New Issue
Block a user