aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main.c b/src/main.c
index c3828d5d9..b233c8473 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1308,16 +1308,7 @@ int sqlite3Checkpoint(sqlite3 *db, int iDb){
for(i=0; i<db->nDb && rc==SQLITE_OK; i++){
if( i==iDb || iDb==SQLITE_MAX_ATTACHED ){
- Btree *pBt = db->aDb[i].pBt;
- if( pBt ){
- if( sqlite3BtreeIsInReadTrans(pBt) ){
- rc = SQLITE_LOCKED;
- }else{
- sqlite3BtreeEnter(pBt);
- rc = sqlite3PagerCheckpoint(sqlite3BtreePager(pBt));
- sqlite3BtreeLeave(pBt);
- }
- }
+ rc = sqlite3BtreeCheckpoint(db->aDb[i].pBt);
}
}