1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix a case where the mapped part of a database file may be written during a backup operation.

FossilOrigin-Name: c8d67aefff7299dd5c8abeb2a3a52109c0a823ee
This commit is contained in:
dan
2013-03-22 19:17:45 +00:00
parent 99bd10979a
commit aa1d67b1d9
5 changed files with 14 additions and 11 deletions

View File

@@ -520,7 +520,7 @@ int sqlite3_backup_step(sqlite3_backup *p, int nPage){
rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
if( rc==SQLITE_OK ){
u8 *zData = sqlite3PagerGetData(pSrcPg);
rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
rc = sqlite3PagerWriteData(pDestPager, zData, pgszSrc, iOff);
}
sqlite3PagerUnref(pSrcPg);
}