1
0
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:
drh
2016-05-13 11:50:00 +00:00
parent 7aeb216a19
commit 935c4d8484
3 changed files with 8 additions and 8 deletions

View File

@@ -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);