[Xfce4-commits] <midori:master> Use truncated journal mode for history database
Christian Dywan
noreply at xfce.org
Wed Oct 13 03:32:01 CEST 2010
Updating branch refs/heads/master
to 324d3c3d6a5621bfcebd24bdf81f861371c50376 (commit)
from 6331573a2c9ec16fcf0ba082e362fbbbcfb49416 (commit)
commit 324d3c3d6a5621bfcebd24bdf81f861371c50376
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Oct 12 23:09:12 2010 +0200
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 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/midori/main.c b/midori/main.c
index 8c9e9ec..5ed6a35 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);"
More information about the Xfce4-commits
mailing list