1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

After a rollback that writes or truncates the database file, sync the database file before invalidating the journal contents.

FossilOrigin-Name: b21b911f233842357af9ccc14525bbd48a38edb1
This commit is contained in:
dan
2010-03-22 17:13:53 +00:00
parent acd63a5a62
commit bb23e7f91b
4 changed files with 38 additions and 19 deletions

View File

@@ -2018,6 +2018,9 @@ end_playback:
rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
testcase( rc!=SQLITE_OK );
}
if( rc==SQLITE_OK && pPager->noSync==0 && pPager->state>=PAGER_EXCLUSIVE ){
rc = sqlite3OsSync(pPager->fd, pPager->sync_flags);
}
if( rc==SQLITE_OK ){
rc = pager_end_transaction(pPager, zMaster[0]!='\0');
testcase( rc!=SQLITE_OK );