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

Ensure that "PRAGMA wal_checkpoint = TRUNCATE|FULL|RESTART" block on other connections and truncate the database file as required even if the entire wal file has already been checkpointed.

FossilOrigin-Name: 53429689d4fcf472edbc89cc50b5e69ba3270634
This commit is contained in:
dan
2015-01-29 19:12:12 +00:00
parent 6267920b09
commit 976b003344
5 changed files with 185 additions and 100 deletions

View File

@@ -1966,6 +1966,7 @@ int sqlite3_wal_checkpoint_v2(
rc = SQLITE_ERROR;
sqlite3ErrorWithMsg(db, SQLITE_ERROR, "unknown database: %s", zDb);
}else{
db->busyHandler.nBusy = 0;
rc = sqlite3Checkpoint(db, iDb, eMode, pnLog, pnCkpt);
sqlite3Error(db, rc);
}