mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Do not attempt to flush the pages of an in-memory database to disk if sqlite3_db_cacheflush() is called.
FossilOrigin-Name: 9b79a390440a23542a370b591e567b31ebb35c42
This commit is contained in:
17
src/pager.c
17
src/pager.c
@@ -4478,15 +4478,16 @@ static int pagerStress(void *p, PgHdr *pPg){
|
||||
*/
|
||||
int sqlite3PagerFlush(Pager *pPager){
|
||||
int rc = pPager->errCode;
|
||||
PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);
|
||||
|
||||
assert( assert_pager_state(pPager) );
|
||||
while( rc==SQLITE_OK && pList ){
|
||||
PgHdr *pNext = pList->pDirty;
|
||||
if( pList->nRef==0 ){
|
||||
rc = pagerStress((void*)pPager, pList);
|
||||
if( !MEMDB ){
|
||||
PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);
|
||||
assert( assert_pager_state(pPager) );
|
||||
while( rc==SQLITE_OK && pList ){
|
||||
PgHdr *pNext = pList->pDirty;
|
||||
if( pList->nRef==0 ){
|
||||
rc = pagerStress((void*)pPager, pList);
|
||||
}
|
||||
pList = pNext;
|
||||
}
|
||||
pList = pNext;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user