tracker r1726 - in branches/xesam-support: . data src/libtracker-db



Author: pvanhoof
Date: Fri Jun 20 14:42:22 2008
New Revision: 1726
URL: http://svn.gnome.org/viewvc/tracker?rev=1726&view=rev

Log:
Merge with indexer-split

Modified:
   branches/xesam-support/ChangeLog
   branches/xesam-support/data/sqlite-service-triggers.sql
   branches/xesam-support/data/sqlite-tracker-triggers.sql
   branches/xesam-support/src/libtracker-db/tracker-db-manager.c

Modified: branches/xesam-support/data/sqlite-service-triggers.sql
==============================================================================
--- branches/xesam-support/data/sqlite-service-triggers.sql	(original)
+++ branches/xesam-support/data/sqlite-service-triggers.sql	Fri Jun 20 14:42:22 2008
@@ -1,5 +1,3 @@
-BEGIN TRANSACTION;!
-
 CREATE TRIGGER delete_service BEFORE DELETE ON Services 
 BEGIN  
 	DELETE FROM ServiceMetaData WHERE ServiceID = old.ID;
@@ -9,5 +7,3 @@
 	DELETE FROM ChildServices WHERE (ChildID = old.ID);
 	
 END;!
-
-COMMIT TRANSACTION;!

Modified: branches/xesam-support/data/sqlite-tracker-triggers.sql
==============================================================================
--- branches/xesam-support/data/sqlite-tracker-triggers.sql	(original)
+++ branches/xesam-support/data/sqlite-tracker-triggers.sql	Fri Jun 20 14:42:22 2008
@@ -1,9 +1,4 @@
-BEGIN TRANSACTION;!
-
-
 CREATE TRIGGER delete_backup_service BEFORE DELETE ON BackupServices 
 BEGIN  
 	DELETE FROM BackupMetaData WHERE ServiceID = old.ID;
 END;!
-
-COMMIT TRANSACTION;!

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 14:42:22 2008
@@ -1712,6 +1712,7 @@
 	iface = db_interface_get (TRACKER_DB_COMMON, &create);
 
 	if (create) {
+		tracker_db_interface_start_transaction (iface);
 		/* Create tables */
 		load_sql_file (iface, "sqlite-tracker.sql", NULL);
 		load_sql_file (iface, "sqlite-metadata.sql", NULL);
@@ -1729,6 +1730,7 @@
 		load_metadata_file (iface, "email.metadata");
 		load_metadata_file (iface, "image.metadata");
 		load_metadata_file (iface, "video.metadata");
+		tracker_db_interface_end_transaction (iface);
 	}
 
 	/* Load static data into tracker ontology */
@@ -1746,7 +1748,9 @@
 	iface = db_interface_get (TRACKER_DB_CACHE, &create);
 
 	if (create) {
+		tracker_db_interface_start_transaction (iface);
 		load_sql_file (iface, "sqlite-cache.sql", NULL);
+		tracker_db_interface_end_transaction (iface);
 	}
 
 	return iface;
@@ -1761,8 +1765,10 @@
 	iface = db_interface_get (TRACKER_DB_FILE_METADATA, &create);
 
 	if (create) {
+		tracker_db_interface_start_transaction (iface);
 		load_sql_file (iface, "sqlite-service.sql", NULL);
 		load_sql_file (iface, "sqlite-service-triggers.sql", "!");
+		tracker_db_interface_end_transaction (iface);
 	}
 
 	return iface;
@@ -1777,7 +1783,9 @@
 	iface = db_interface_get (TRACKER_DB_FILE_CONTENTS, &create);
 
 	if (create) {
+		tracker_db_interface_start_transaction (iface);
 		load_sql_file (iface, "sqlite-contents.sql", NULL);
+		tracker_db_interface_end_transaction (iface);
 	}
 
 	tracker_db_interface_sqlite_create_function (iface, 
@@ -1801,9 +1809,11 @@
 	iface = db_interface_get (TRACKER_DB_EMAIL_METADATA, &create);
 
 	if (create) {
+		tracker_db_interface_start_transaction (iface);
 		load_sql_file (iface, "sqlite-service.sql", NULL);
 		load_sql_file (iface, "sqlite-email.sql", NULL);
 		load_sql_file (iface, "sqlite-service-triggers.sql", "!");
+		tracker_db_interface_end_transaction (iface);
 	}
 
 	return iface;
@@ -1818,7 +1828,9 @@
 	iface = db_interface_get (TRACKER_DB_EMAIL_CONTENTS, &create);
 
 	if (create) {
+		tracker_db_interface_start_transaction (iface);
 		load_sql_file (iface, "sqlite-contents.sql", NULL);
+		tracker_db_interface_end_transaction (iface);
 	}
 
 	tracker_db_interface_sqlite_create_function (iface, 



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