[tracker/ontology-cope-for-master: 430/433] libtracker-data: Mark new classes and properties as is_new in journal-replay



commit 07bef1e094abc2f0026e4492dfc792da3b46c359
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Mar 22 12:10:13 2010 +0100

    libtracker-data: Mark new classes and properties as is_new in journal-replay

 src/libtracker-data/tracker-data-manager.c |    3 +++
 src/libtracker-data/tracker-data-update.c  |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index dc12536..b81b016 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1541,6 +1541,9 @@ tracker_data_manager_init (TrackerDBManagerFlags  flags,
 		/* load ontology from journal into memory */
 		load_ontology_from_journal (&classes, &properties, &id_uri_map);
 
+		/* ensure FTS is fully initialized */
+		tracker_db_interface_execute_query (iface, NULL, "SELECT 1 FROM fulltext.fts WHERE rowid = 0");
+
 		tracker_data_begin_db_transaction_for_replay (tracker_db_journal_reader_get_time ());
 		tracker_db_interface_sqlite_fts_init (TRACKER_DB_INTERFACE_SQLITE (iface), TRUE);
 		tracker_data_ontology_import_into_db (FALSE);
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index c0748f5..c83c012 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2343,7 +2343,7 @@ ontology_statement_insert (GList       *ontology_queue,
 	predicate = g_hash_table_lookup (id_uri_map, GINT_TO_POINTER (predicate_id));
 
 	tracker_data_ontology_load_statement ("journal", subject_id, subject, predicate, 
-	                                      object, NULL, FALSE, classes, properties);
+	                                      object, NULL, TRUE, classes, properties);
 
 	ontology_queue = queue_statement (ontology_queue, graph, subject, predicate, object, is_uri);
 



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