Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Source/CBL_SQLiteStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ - (BOOL) openFMDB: (NSError**)outError {

// Register CouchDB-compatible JSON collation functions:
sqlite3* dbHandle = _fmdb.sqliteHandle;
sqlite3_busy_timeout(dbHandle, 5000);
sqlite3_create_collation(dbHandle, "JSON", SQLITE_UTF8,
kCBLCollateJSON_Unicode, CBLCollateJSON);
sqlite3_create_collation(dbHandle, "JSON_RAW", SQLITE_UTF8,
Expand Down Expand Up @@ -2209,7 +2210,7 @@ - (BOOL) compact: (NSError**)outError {
Log(@" ... deleted %d revisions", _fmdb.changes);

Log(@"Flushing SQLite WAL...");
if (![_fmdb executeUpdate: @"PRAGMA wal_checkpoint(RESTART)"])
if (![_fmdb executeUpdate: @"PRAGMA wal_checkpoint(PASSIVE)"])
return CBLStatusToOutNSError(self.lastDbError, outError);

Log(@"Vacuuming SQLite database...");
Expand Down