mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Add the SQLITE_FCNTL_RESET_CACHE verb. Use it to ensure that the page cache is purged before and after a the recovery extension is run.
FossilOrigin-Name: 6db0bc4bc0d272b610bef2aeeae43f539ed6e7cc0a9cc767d5af85ecb0019d5f
This commit is contained in:
11
src/btree.c
11
src/btree.c
@@ -11083,6 +11083,17 @@ int sqlite3BtreeIsReadonly(Btree *p){
|
||||
*/
|
||||
int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage)); }
|
||||
|
||||
/*
|
||||
** If no transaction is active and the database is not a temp-db, clear
|
||||
** the in-memory pager cache.
|
||||
*/
|
||||
void sqlite3BtreeClearCache(Btree *p){
|
||||
BtShared *pBt = p->pBt;
|
||||
if( pBt->inTransaction==TRANS_NONE ){
|
||||
sqlite3PagerClearCache(pBt->pPager);
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(SQLITE_OMIT_SHARED_CACHE)
|
||||
/*
|
||||
** Return true if the Btree passed as the only argument is sharable.
|
||||
|
Reference in New Issue
Block a user