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

Modify the interface to the blocking wal-checkpoint functionality.

FossilOrigin-Name: 72787c010c8944e8fcf9c98aa4482f129142d8e9
This commit is contained in:
dan
2010-11-18 12:11:05 +00:00
parent a58f26f93f
commit cdc1f049bf
14 changed files with 236 additions and 93 deletions

View File

@@ -6520,17 +6520,16 @@ sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
** "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
** or wal_blocking_checkpoint() API functions.
**
** Parameter bBlock is true for a blocking-checkpoint, false for an
** ordinary, non-blocking, checkpoint.
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
*/
int sqlite3PagerCheckpoint(Pager *pPager, int bBlock){
int sqlite3PagerCheckpoint(Pager *pPager, int eMode, int *pnLog, int *pnCkpt){
int rc = SQLITE_OK;
if( pPager->pWal ){
u8 *zBuf = (u8 *)pPager->pTmpSpace;
rc = sqlite3WalCheckpoint(pPager->pWal,
(bBlock ? pPager->xBusyHandler : 0), pPager->pBusyHandlerArg,
rc = sqlite3WalCheckpoint(pPager->pWal, eMode,
pPager->xBusyHandler, pPager->pBusyHandlerArg,
(pPager->noSync ? 0 : pPager->sync_flags),
pPager->pageSize, zBuf
pPager->pageSize, (u8 *)pPager->pTmpSpace,
pnLog, pnCkpt
);
}
return rc;