mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix pager_end_transaction() to ensure that a ROLLBACK does not clobber
unwritten pages in a TEMP file pcache. FossilOrigin-Name: 9495d33879221c1821331dc72c61a6a3d182f526
This commit is contained in:
@@ -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( pagerFlushOnCommit(pPager) ){
|
||||
if( !pPager->tempFile || (bCommit && pagerFlushOnCommit(pPager)) ){
|
||||
sqlite3PcacheCleanAll(pPager->pPCache);
|
||||
}else{
|
||||
sqlite3PcacheClearWritable(pPager->pPCache);
|
||||
|
Reference in New Issue
Block a user