From 324d3c3d6a5621bfcebd24bdf81f861371c50376 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 12 Oct 2010 23:09:12 +0200 Subject: [PATCH] Use truncated journal mode for history database This instructs sqlite to preserve the journal file, which can improve performance and allows it to be a symbolic link. --- midori/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/midori/main.c b/midori/main.c index 8c9e9ecd..5ed6a357 100644 --- a/midori/main.c +++ b/midori/main.c @@ -368,6 +368,12 @@ midori_history_initialize (KatzeArray* array, return NULL; } + sqlite3_exec (db, "PRAGMA journal_mode = TRUNCATE;", NULL, NULL, errmsg); + if (*errmsg) + { + g_warning ("Failed to set journal mode: %s", *errmsg); + sqlite3_free (*errmsg); + } if (sqlite3_exec (db, "CREATE TABLE IF NOT EXISTS " "history (uri text, title text, date integer, day integer);" -- 2.39.5