commit c4ca8a684c3cc5b14e9675d1dbe1b84f813e0c5b
Author: Chenthill Palanisamy <pchenthill@novell.com>
Date:   Thu May 26 17:03:26 2011 +0530

    CamelDB: Initiate a transaction before writing into db.

diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 3936226..bb87f0f 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -958,7 +958,11 @@ vee_folder_dispose (GObject *object)
 			folder = CAMEL_FOLDER (vf);
 			parent_store = camel_folder_get_parent_store (folder);
 			record = summary_header_to_db (folder->summary, NULL);
+			
+			camel_db_begin_transaction (parent_store->cdb_w, NULL);
 			camel_db_write_folder_info_record (parent_store->cdb_w, record, NULL);
+			camel_db_end_transaction (parent_store->cdb_w, NULL);
+
 			g_free (record->folder_name);
 			g_free (record);
 		}
@@ -2388,8 +2392,10 @@ camel_vee_folder_sync_headers (CamelFolder *vf,
 	start = time (NULL);
 	record = summary_header_to_db (vf->summary, error);
 	parent_store = camel_folder_get_parent_store (vf);
+	camel_db_begin_transaction (parent_store->cdb_w, NULL);
 	camel_db_write_folder_info_record (parent_store->cdb_w, record, error);
 	end = time (NULL);
+	camel_db_end_transaction (parent_store->cdb_w, NULL);
 
 	g_free (record->folder_name);
 	g_free (record);
