1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

If an error occurs while writing to the database file during a VACUUM, discard the contents of the in-memory cache. This is required as if the database is a zipvfs database, the contents of the cache may be inconsistent with respect to the database as stored on disk.

FossilOrigin-Name: 07159e84b40b01fa40cac5fad1f433888e5984f8
This commit is contained in:
dan
2011-10-21 14:27:32 +00:00
parent d337c5bde8
commit 1a83bc5b1a
5 changed files with 20 additions and 10 deletions

View File

@@ -6836,6 +6836,13 @@ int sqlite3PagerCloseWal(Pager *pPager){
return rc;
}
/*
** Unless this is an in-memory or temporary database, clear the pager cache.
*/
void sqlite3PagerClearCache(Pager *pPager){
if( !MEMDB && pPager->tempFile==0 ) pager_reset(pPager);
}
#ifdef SQLITE_HAS_CODEC
/*
** This function is called by the wal module when writing page content