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.
This commit is contained in:
Christian Dywan 2010-10-12 23:09:12 +02:00
parent 6331573a2c
commit 324d3c3d6a

View file

@ -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);"