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



commit c100f57798403b8c113ed645397248c32b969e7a
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 da1b46d..94bb601 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2424,9 +2424,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]