summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-01-04 16:31:37 -0500
committerJune McEnroe <june@causal.agency>2020-01-04 16:31:37 -0500
commitb38db63193ffa8ca4b686ff7dd82257e436b23d8 (patch)
treea4eb91c0ef47212360f0506906bec6ccc3b67503
parentAdd -N option to litterbox (diff)
downloadlitterbox-b38db63193ffa8ca4b686ff7dd82257e436b23d8.tar.gz
litterbox-b38db63193ffa8ca4b686ff7dd82257e436b23d8.zip
Enable SQLite WAL
Diffstat (limited to '')
-rw-r--r--database.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/database.h b/database.h
index 26ae57e..a1370b5 100644
--- a/database.h
+++ b/database.h
@@ -87,6 +87,7 @@ static inline void dbOpen(char *path, int flags) {
 	if (error) errx(EX_NOINPUT, "%s: %s", path, sqlite3_errmsg(db));
 
 	sqlite3_busy_timeout(db, 1000);
+	dbExec(SQL(PRAGMA journal_mode = WAL;));
 	dbExec(SQL(PRAGMA foreign_keys = true;));
 }