summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b865cb)
raw | patch | inline | side by side (parent: 0b865cb)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Jul 2014 07:16:44 +0000 (09:16 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 21 Jul 2014 07:16:44 +0000 (09:16 +0200) |
This would have been silently treated as 'IS NULL'.
src/core/store_lookup.c | patch | blob | history | |
t/unit/core/store_lookup_test.c | patch | blob | history |
index 317be555b7be0560833fd056e47daf8e1d0e72e7..da9f55076f6d5a1fc33969bee7012d3fb6ea6856 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
if (! strcasecmp(attr, "name"))
return NULL;
- if (! strcasecmp(op, "IS"))
- return sdb_store_isnull_matcher(attr);
+ if (! strcasecmp(op, "IS")) {
+ if (! value)
+ return sdb_store_isnull_matcher(attr);
+ else
+ return NULL;
+ }
else if (! value)
return NULL;
else if (! strcasecmp(op, "<"))
index d6a71e566aea8e0919819984cec6814d55ef0c82..7536f390bc96cfe9b556326271925c367ff6d0a7 100644 (file)
{ "attribute", "attr", ">=", &attrname, MATCHER_GE },
{ "attribute", "attr", ">", &attrname, MATCHER_GT },
{ "attribute", "attr", "IS", NULL, MATCHER_ISNULL },
+ { "attribute", "attr", "IS", &attrname, -1 },
{ "foo", "name", "=", &attrname, -1 },
{ "foo", "attr", "=", &attrname, -1 },
};