Commit 42305de4 authored by Jürg Billeter's avatar Jürg Billeter

libtracker-data: Set synchronous = NORMAL with --disable-journal

This prevents database corruption followed by expensive journal replay
on OS crash or loss of power.
parent 8eb4d436
...@@ -233,7 +233,11 @@ db_set_params (TrackerDBInterface *iface, ...@@ -233,7 +233,11 @@ db_set_params (TrackerDBInterface *iface,
GError *internal_error = NULL; GError *internal_error = NULL;
TrackerDBStatement *stmt; TrackerDBStatement *stmt;
#ifdef DISABLE_JOURNAL
tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = NORMAL;");
#else
tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = OFF;"); tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = OFF;");
#endif /* DISABLE_JOURNAL */
tracker_db_interface_execute_query (iface, NULL, "PRAGMA count_changes = 0;"); tracker_db_interface_execute_query (iface, NULL, "PRAGMA count_changes = 0;");
tracker_db_interface_execute_query (iface, NULL, "PRAGMA temp_store = FILE;"); tracker_db_interface_execute_query (iface, NULL, "PRAGMA temp_store = FILE;");
tracker_db_interface_execute_query (iface, NULL, "PRAGMA encoding = \"UTF-8\""); tracker_db_interface_execute_query (iface, NULL, "PRAGMA encoding = \"UTF-8\"");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment