1
0
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:
dan
2010-06-02 17:15:24 +00:00
parent 2796d336d2
commit 10ec894c3a
3 changed files with 11 additions and 9 deletions

View File

@@ -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