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

Add calls to the BenignMalloc() functions around the SQLITE_FCNTL_OVERWRITE call in backup.c.

FossilOrigin-Name: 3e0833dbb736a1aca08d17941d6d33901b15a03b
This commit is contained in:
dan
2011-12-31 10:18:00 +00:00
parent b3ce3d6d92
commit 23a3de398e
3 changed files with 9 additions and 7 deletions

View File

@@ -678,7 +678,9 @@ int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
pFd = sqlite3PagerFile(sqlite3BtreePager(pTo));
if( pFd->pMethods ){
i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);
sqlite3BeginBenignMalloc();
sqlite3OsFileControl(pFd, SQLITE_FCNTL_OVERWRITE, &nByte);
sqlite3EndBenignMalloc();
}
/* Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set