For in-memory databases, it does not matter if pcache entries are marked
"clean" or "writable". FossilOrigin-Name: ad601c7962a60a11699cf31f1faee09b95d5c710
This commit is contained in:
+1
-1
@@ -2033,7 +2033,7 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){
|
||||
pPager->pInJournal = 0;
|
||||
pPager->nRec = 0;
|
||||
if( rc==SQLITE_OK ){
|
||||
if( MEMDB || pagerFlushOnCommit(pPager) ){
|
||||
if( pagerFlushOnCommit(pPager) ){
|
||||
sqlite3PcacheCleanAll(pPager->pPCache);
|
||||
}else{
|
||||
sqlite3PcacheClearWritable(pPager->pPCache);
|
||||
|
||||
+7
-1
@@ -14,7 +14,13 @@
|
||||
#include "sqliteInt.h"
|
||||
|
||||
/*
|
||||
** A complete page cache is an instance of this structure.
|
||||
** A complete page cache is an instance of this structure. Every
|
||||
** entry in the cache holds a single page of the database file. The
|
||||
** btree layer only operates on the cached copy of the database pages.
|
||||
**
|
||||
** A page cache entry is "clean" if it exactly matches what is currently
|
||||
** on disk. A page is "dirty" if it has been modified and needs to be
|
||||
** persisted to disk.
|
||||
**
|
||||
** pDirty, pDirtyTail, pSynced:
|
||||
** All dirty pages are linked into the doubly linked list using
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ struct PgHdr {
|
||||
sqlite3_pcache_page *pPage; /* Pcache object page handle */
|
||||
void *pData; /* Page data */
|
||||
void *pExtra; /* Extra content */
|
||||
PgHdr *pDirty; /* Transient list of dirty pages */
|
||||
PgHdr *pDirty; /* Transient list of dirty sorted by pgno */
|
||||
Pager *pPager; /* The pager this page is part of */
|
||||
Pgno pgno; /* Page number for this page */
|
||||
#ifdef SQLITE_CHECK_PAGES
|
||||
|
||||
Reference in New Issue
Block a user