GNOME Bugzilla – Bug 569405
Negated header criterion fails to match messages without the header
Last modified: 2009-02-25 14:00:44 UTC
Please describe the problem: When performing a search using the database backend, a negated header criterion such as "Recipients does not contain" fails to match messages that lack the header in question altogether. The memory backend does not have this problem, as one can see by setting "Include threads": "All related". Steps to reproduce: 1. Post a message to the Inbox, making sure the CC field is blank. 2. On the menu bar, go to "Search" -> "Advanced Search". 3. Enter the single criterion "Recipients", "does not contain", "foo". 4. Press OK. Actual results: The posted message does not appear in the Inbox. Expected results: The posted message appears in the Inbox. Does this happen every time? Yes. Other information: The problem is that the nonexistence of a header is represented by NULL in the database, and the NULLness propagates all the way to the outermost level of the query constructed by camel_sexp_to_sql_sexp, where it is interpreted as false, even though the criterion was intended to be negated. I'm sorry if this is a duplicate. I tried to search, but Bugzilla apparently was overloaded and hit the 60-second time limit.
Created attachment 127367 [details] [review] Fix: check that the header is NOTNULL
To stable and trunk
Patch committed to stable (gnome-2-24) branch as r10020 http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=10020 Patch committed to SVN trunk as r10021 http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=10021