summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 31566d5)
raw | patch | inline | side by side (parent: 31566d5)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 21 Oct 2014 07:56:08 +0000 (09:56 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 21 Oct 2014 07:56:08 +0000 (09:56 +0200) |
src/core/store_lookup.c | patch | blob | history | |
t/unit/core/store_lookup_test.c | patch | blob | history |
index f1baea644a4c2f2b2ee16e18ecc3d531f0e4f723..5187a3785b3b737be5964906c11c32e0d60c384d 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
free(raw);
}
- if (sdb_store_expr_eval(CMP_M(m)->left, obj, &v, filter))
+ if ((sdb_store_expr_eval(CMP_M(m)->left, obj, &v, filter))
+ || (sdb_data_isnull(&v)))
status = 0;
else {
char value[sdb_data_strlen(&v) + 1];
index c5aad2c51f3670cd6f469d7650de349d6504a56a..0b81ebd0bab70dd35f7bb4a172c5a953c4ab73c9 100644 (file)
"NOT attribute['x'] = ''", 2 }, /* filter always matches */
{ "attribute = 'x'", NULL, 0 },
{ "attribute['k1'] = 'v1'", NULL, 1 },
+ { "attribute['k1'] =~ 'v'", NULL, 2 },
+ { "attribute['k1'] !~ 'v'", NULL, 1 },
+ { "attribute['x1'] =~ 'v'", NULL, 0 },
+ { "attribute['x1'] =~ 'NULL'", NULL, 0 },
+ { "attribute['x1'] !~ 'v'", NULL, 3 },
{ "attribute['k1'] IS NULL", NULL, 1 },
{ "attribute['x1'] IS NULL", NULL, 3 },
{ "attribute['k1'] IS NOT NULL", NULL, 2 },