[tracker/checkpoint: 6/16] libtracker-data: Set synchronous = NORMAL



commit 36034e3156cd0378d1ccdd0e1864a0e3581b04ab
Author: JÃrg Billeter <j bitron ch>
Date:   Thu Jun 23 12:59:35 2011 +0200

    libtracker-data: Set synchronous = NORMAL
    
    This prevents database corruption followed by expensive journal replay
    on OS crash or loss of power.

 src/libtracker-data/tracker-db-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index bd3bfd2..5a86aed 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -234,7 +234,7 @@ db_set_params (TrackerDBInterface   *iface,
 		GError *internal_error = NULL;
 		TrackerDBStatement *stmt;
 
-		tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = OFF;");
+		tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = NORMAL;");
 		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 encoding = \"UTF-8\"");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]