evolution-data-server r9286 - trunk/camel
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9286 - trunk/camel
- Date: Wed, 6 Aug 2008 13:31:24 +0000 (UTC)
Author: sragavan
Date: Wed Aug 6 13:31:24 2008
New Revision: 9286
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9286&view=rev
Log:
2008-08-06 Srinivasa Ragavan <sragavan novell com>
* camel/camel-db.c: Some formatting changes.
* camel/camel-vee-folder.c: Set query only when it changes.
Modified:
trunk/camel/ChangeLog
trunk/camel/camel-db.c
trunk/camel/camel-vee-folder.c
Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c (original)
+++ trunk/camel/camel-db.c Wed Aug 6 13:31:24 2008
@@ -616,7 +616,7 @@
GPtrArray *array;
char *tmp = g_strdup_printf("%s%%", filter ? filter:"");
if(filter)
- cond = sqlite3_mprintf("WHERE vuid LIKE %Q", tmp);
+ cond = sqlite3_mprintf(" WHERE vuid LIKE %Q", tmp);
g_free(tmp);
sel_query = sqlite3_mprintf("SELECT vuid FROM %Q%s", folder_name, filter ? cond : "");
Modified: trunk/camel/camel-vee-folder.c
==============================================================================
--- trunk/camel/camel-vee-folder.c (original)
+++ trunk/camel/camel-vee-folder.c Wed Aug 6 13:31:24 2008
@@ -959,14 +959,14 @@
} else {
/* Load the folder results from the DB. */
match = camel_vee_summary_get_ids ((CamelVeeSummary *)folder->summary, u.hash);
-
+ d(printf("len = %d %d for %s %s\n", match ? match->len:0, rebuilded, source->full_name, shash));
if (!match) {
match = camel_folder_search_by_expression(f, vf->expression, ex);
if (match == NULL)
return -1;
rebuilded = TRUE;
}
- d(printf("len = %d %d\n", match->len, rebuilded));
+
}
u.source = source;
@@ -1704,13 +1704,15 @@
return;
}
+ /* Recreate the table when the query changes, only if we are not setting it first */
+ if (vf->expression)
+ camel_db_recreate_vfolder (((CamelFolder *) vf)->parent_store->cdb, ((CamelFolder *) vf)->full_name, NULL);
+
+
g_free(vf->expression);
if (query)
vf->expression = g_strdup(query);
- /* Recreate the table when the query changes. */
- camel_db_recreate_vfolder (((CamelFolder *) vf)->parent_store->cdb, ((CamelFolder *) vf)->full_name, NULL);
-
node = p->folders;
while (node) {
CamelFolder *f = node->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]