[tracker/journal: 18/21] libtracker-data: Fix constraint error warnings during journal replay



commit d7156913effac5e52b4c1ba7162938257c16e306
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Mar 16 15:28:04 2010 +0100

    libtracker-data: Fix constraint error warnings during journal replay

 src/libtracker-data/tracker-data-update.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index ba5e200..819e045 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2454,9 +2454,18 @@ tracker_data_replay_journal (GHashTable *classes,
 			TrackerDBStatement *stmt;
 			gint id;
 			const gchar *uri;
+			TrackerProperty *property;
+			TrackerClass *class;
 
 			tracker_db_journal_reader_get_resource (&id, &uri);
 
+			class = g_hash_table_lookup (classes, GINT_TO_POINTER (id));
+			if (!class)
+				property = g_hash_table_lookup (properties, GINT_TO_POINTER (id));
+
+			if (property || class)
+				continue;
+
 			iface = tracker_db_manager_get_db_interface ();
 
 			stmt = tracker_db_interface_create_statement (iface,



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