After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 569405 - Negated header criterion fails to match messages without the header
Negated header criterion fails to match messages without the header
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
2.24.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks: 543389
 
 
Reported: 2009-01-27 23:10 UTC by Matt McCutchen
Modified: 2009-02-25 14:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Fix: check that the header is NOTNULL (547 bytes, patch)
2009-01-27 23:12 UTC, Matt McCutchen
committed Details | Review

Description Matt McCutchen 2009-01-27 23:10:03 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.
Comment 1 Matt McCutchen 2009-01-27 23:12:16 UTC
Created attachment 127367 [details] [review]
Fix: check that the header is NOTNULL
Comment 2 Srinivasa Ragavan 2009-01-28 02:44:27 UTC
To stable and trunk
Comment 3 Suman Manjunath 2009-02-02 03:57:38 UTC
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