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

Merge in the blocking-checkpoint enhancement, including the new

sqlite3_wal_checkpoint_v2() interface and the
PRAGMA wal_checkpoint(full) statement.

FossilOrigin-Name: bac7342c368a7c4f5f2878e08d9581dcbf57dd58
This commit is contained in:
drh
2011-02-02 16:34:08 +00:00
23 changed files with 806 additions and 121 deletions

View File

@@ -7932,8 +7932,10 @@ 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.
**
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
*/
int sqlite3BtreeCheckpoint(Btree *p){
int sqlite3BtreeCheckpoint(Btree *p, int eMode, int *pnLog, int *pnCkpt){
int rc = SQLITE_OK;
if( p ){
BtShared *pBt = p->pBt;
@@ -7941,7 +7943,7 @@ int sqlite3BtreeCheckpoint(Btree *p){
if( pBt->inTransaction!=TRANS_NONE ){
rc = SQLITE_LOCKED;
}else{
rc = sqlite3PagerCheckpoint(pBt->pPager);
rc = sqlite3PagerCheckpoint(pBt->pPager, eMode, pnLog, pnCkpt);
}
sqlite3BtreeLeave(p);
}