mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Do not sync any files in wal mode if "PRAGMA synchronous=off" is set. If files are synced, pass either SQLITE_SYNC_FULL or SQLITE_SYNC_NORMAL to the xSync() callback as configured by "PRAGMA fullfsync".
FossilOrigin-Name: 0ae91b0008b242a47385fc1f295c6b645483ee22
This commit is contained in:
@@ -2871,7 +2871,9 @@ int sqlite3PagerClose(Pager *pPager){
|
||||
sqlite3BeginBenignMalloc();
|
||||
pPager->errCode = 0;
|
||||
pPager->exclusiveMode = 0;
|
||||
sqlite3LogClose(pPager->pLog, pPager->fd, pTmp);
|
||||
sqlite3LogClose(pPager->pLog, pPager->fd,
|
||||
(pPager->noSync ? 0 : pPager->sync_flags), pTmp
|
||||
);
|
||||
pPager->pLog = 0;
|
||||
pager_reset(pPager);
|
||||
if( MEMDB ){
|
||||
@@ -4881,7 +4883,7 @@ int sqlite3PagerCommitPhaseOne(
|
||||
PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);
|
||||
if( pList ){
|
||||
rc = sqlite3LogFrames(pPager->pLog, pPager->pageSize, pList,
|
||||
pPager->dbSize, 1, pPager->fullSync
|
||||
pPager->dbSize, 1, (pPager->fullSync ? pPager->sync_flags : 0)
|
||||
);
|
||||
}
|
||||
sqlite3PcacheCleanAll(pPager->pPCache);
|
||||
@@ -5700,6 +5702,7 @@ int sqlite3PagerCheckpoint(Pager *pPager){
|
||||
if( pPager->pLog ){
|
||||
u8 *zBuf = (u8 *)pPager->pTmpSpace;
|
||||
rc = sqlite3LogCheckpoint(pPager->pLog, pPager->fd,
|
||||
(pPager->noSync ? 0 : pPager->sync_flags),
|
||||
zBuf, pPager->xBusyHandler, pPager->pBusyHandlerArg
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user