2008-07-24 Srinivasa Ragavan <sragavan@novell.com>
+ ** Fix for bug #544501
+
+ * camel/camel-search-sql.c: Handle single node search queries.
+
+2008-07-24 Srinivasa Ragavan <sragavan@novell.com>
+
** Fix for bug #544528
* camel/camel-search-sql.c: Ignore match-threads. It wont be supported
/* Time to operate on the stack. */
tmp = all;
+ if (g_list_length (all) == 1) {
+ n1 = all->data;
+
+ sql = g_strdup (n1->exact_token);
+ free_node(n1);
+ g_list_free (all);
+ g_scanner_destroy(scanner);
+ return sql;
+ }
+
while (all->next) {
n1 = tmp->data;
all = g_list_delete_link (all, all);
"(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\")))) (and (or (match-all (not (= (get-sent-date) 1216146600))) )))",
"(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\")))) (and (or (match-all (= (get-sent-date) 1216146600)) )))" ,
"(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\")))) (and (and (match-all (header-contains \"Subject\" \"mysubject\")) (match-all (not (header-matches \"From\" \"mysender\"))) (match-all (= (get-sent-date) (+ (get-current-date) 1))) (match-all (= (get-received-date) (- (get-current-date) 604800))) (match-all (or (= (user-tag \"label\") \"important\") (user-flag (+ \"$Label\" \"important\")) (match-all (< (get-size) 7000)) (match-all (not (= (get-sent-date) 1216146600))) (match-all (> (cast-int (user-tag \"score\")) 3)) (user-flag \"important\"))) (match-all (system-flag \"Deleted\")) (match-all (not (= (user-tag \"follow-up\") \"\"))) (match-all (= (user-tag \"completed-on\") \"\")) (match-all (system-flag \"Attachments\")) (match-all (header-contains \"x-camel-mlist\" \"evo-hackers\")) )))",
- "(match-threads \"all\" (or (match-all (header-contains \"From\" \"@edesvcs.com\")) (match-all (or (header-contains \"To\" \"@edesvcs.com\") (header-contains \"Cc\" \"@edesvcs.com\"))) ))"
+ "(match-threads \"all\" (or (match-all (header-contains \"From\" \"@edesvcs.com\")) (match-all (or (header-contains \"To\" \"@edesvcs.com\") (header-contains \"Cc\" \"@edesvcs.com\"))) ))",
+ "(match-all (not (system-flag \"deleted\")))"
};