diff options
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c index 7e8c39feb..94100f48f 100644 --- a/src/btree.c +++ b/src/btree.c @@ -7935,8 +7935,15 @@ int sqlite3BtreeIsInTrans(Btree *p){ ** ** Return SQLITE_LOCKED if this or any other connection has an open ** transaction on the shared-cache the argument Btree is connected to. +** +** If parameter bBlock is true, then the layers below invoke the +** busy-handler callback while waiting for readers to release locks so +** that the entire WAL can be checkpointed. If it is false, then as +** much as possible of the WAL is checkpointed without waiting for readers +** to finish. bBlock is true for "PRAGMA wal_blocking_checkpoint" and false +** for "PRAGMA wal_checkpoint". */ -int sqlite3BtreeCheckpoint(Btree *p){ +int sqlite3BtreeCheckpoint(Btree *p, int bBlock){ int rc = SQLITE_OK; if( p ){ BtShared *pBt = p->pBt; @@ -7944,7 +7951,7 @@ int sqlite3BtreeCheckpoint(Btree *p){ if( pBt->inTransaction!=TRANS_NONE ){ rc = SQLITE_LOCKED; }else{ - rc = sqlite3PagerCheckpoint(pBt->pPager); + rc = sqlite3PagerCheckpoint(pBt->pPager, bBlock); } sqlite3BtreeLeave(p); } |