tracker r1731 - in branches/xesam-support: . data src/libtracker-db
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1731 - in branches/xesam-support: . data src/libtracker-db
- Date: Fri, 20 Jun 2008 15:18:44 +0000 (UTC)
Author: pvanhoof
Date: Fri Jun 20 15:18:44 2008
New Revision: 1731
URL: http://svn.gnome.org/viewvc/tracker?rev=1731&view=rev
Log:
Sync with indexer-split
Modified:
branches/xesam-support/ChangeLog
branches/xesam-support/data/sqlite-stored-procs.sql
branches/xesam-support/src/libtracker-db/tracker-db-manager.c
Modified: branches/xesam-support/data/sqlite-stored-procs.sql
==============================================================================
--- branches/xesam-support/data/sqlite-stored-procs.sql (original)
+++ branches/xesam-support/data/sqlite-stored-procs.sql Fri Jun 20 15:18:44 2008
@@ -25,7 +25,7 @@
GetNewID SELECT OptionValue FROM Options WHERE OptionKey = 'Sequence';
UpdateNewID UPDATE Options set OptionValue = ? WHERE OptionKey = 'Sequence';
CreateEvent INSERT INTO Events (ID, ServiceID, EventType) VALUES (?,?,?);
-DeleteHandledEvents DELETE FROM Events WHERE BeingHandled = 1;
+DeleteHandledEvents DELETE FROM cache.Events WHERE BeingHandled = 1;
GetEvents SELECT ID, ServiceID, EventType FROM Events WHERE BeingHandled = 1;
SetEventsBeingHandled UPDATE Events SET BeingHandled = 1;
Modified: branches/xesam-support/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- branches/xesam-support/src/libtracker-db/tracker-db-manager.c (original)
+++ branches/xesam-support/src/libtracker-db/tracker-db-manager.c Fri Jun 20 15:18:44 2008
@@ -2036,6 +2036,7 @@
{
TrackerDBInterface *iface;
gboolean create;
+ guint i;
iface = db_interface_get (TRACKER_DB_XESAM, &create);
@@ -2049,17 +2050,31 @@
}
if (create) {
- load_sql_file (attach_iface, "sqlite-xesam.sql", NULL);
-
- load_service_file_xesam (attach_iface, "xesam.metadata");
- load_service_file_xesam (attach_iface, "xesam-convenience.metadata");
- load_service_file_xesam (attach_iface, "xesam-virtual.metadata");
- load_service_file_xesam (attach_iface, "xesam.service");
- load_service_file_xesam (attach_iface, "xesam-convenience.service");
- load_service_file_xesam (attach_iface, "xesam-service.smapping");
- load_service_file_xesam (attach_iface, "xesam-metadata.mmapping");
-
- db_xesam_create_lookup (attach_iface);
+ tracker_db_interface_start_transaction (iface);
+ load_sql_file (iface, "sqlite-xesam.sql", NULL);
+ load_service_file_xesam (iface, "xesam.metadata");
+ load_service_file_xesam (iface, "xesam-convenience.metadata");
+ load_service_file_xesam (iface, "xesam-virtual.metadata");
+ load_service_file_xesam (iface, "xesam.service");
+ load_service_file_xesam (iface, "xesam-convenience.service");
+ load_service_file_xesam (iface, "xesam-service.smapping");
+ load_service_file_xesam (iface, "xesam-metadata.mmapping");
+ db_xesam_create_lookup (iface);
+ tracker_db_interface_end_transaction (iface);
+ }
+
+ /* Xesam's DB connection depends on all interfaces being attached.
+ * The current initialization code does not guarantee that all are
+ * at this point indeed already attached. */
+
+ for (i = 0; i < G_N_ELEMENTS (dbs); i++) {
+ gboolean dummy;
+ TrackerDBInterface *dependency_iface;
+
+ dependency_iface = db_interface_get (dbs[i].db, &dummy);
+ g_object_unref (dependency_iface);
+ /* If it was not yet created, we have a problem */
+ g_assert (!dummy);
}
/* Load static xesam data */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]