summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d80882)
raw | patch | inline | side by side (parent: 9d80882)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 27 Feb 2015 18:15:47 +0000 (19:15 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 27 Feb 2015 18:15:47 +0000 (19:15 +0100) |
src/frontend/analyzer.c | patch | blob | history | |
t/integration/query.sh | patch | blob | history |
index 894cc22f706376ac5df8fff483803a612ea07284..607015c233ce15cd4df4129b32024b95e7c735e1 100644 (file)
--- a/src/frontend/analyzer.c
+++ b/src/frontend/analyzer.c
return -1;
if ((CMP_M(m)->left->data_type > 0)
- && (CMP_M(m)->right->data_type > 0)
- && (CMP_M(m)->left->data_type == CMP_M(m)->right->data_type))
- return 0;
+ && (CMP_M(m)->right->data_type > 0)) {
+ if (CMP_M(m)->left->data_type == CMP_M(m)->right->data_type)
+ return 0;
+ cmp_error(errbuf, m->type, CMP_M(m)->left->data_type,
+ CMP_M(m)->right->data_type);
+ return -1;
+ }
if ((CMP_M(m)->left->data_type > 0)
&& (CMP_M(m)->left->data_type & SDB_TYPE_ARRAY)) {
cmp_error(errbuf, m->type, CMP_M(m)->left->data_type,
diff --git a/t/integration/query.sh b/t/integration/query.sh
index 72a0b88426adae7496deee4c9b4d8f6d7e845c02..5bd09b4507961be4614dd59f7c54334fef3d1bf7 100755 (executable)
--- a/t/integration/query.sh
+++ b/t/integration/query.sh
echo "$output" | grep -F 'some.host.name' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "FETCH host 'host1.example.com' FILTER last_update < 0" 2>&1 )" \
+ -c "FETCH host 'host1.example.com' FILTER last_update < 0s" 2>&1 )" \
&& exit 1
echo "$output" | grep -F 'not found'
| run_sysdb -H "$SOCKET_FILE"
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "FETCH host 'host1.example.com' FILTER age < 0" 2>&1 )" && exit 1
+ -c "FETCH host 'host1.example.com' FILTER age < 0s" 2>&1 )" && exit 1
echo "$output" | grep -F 'not found'
# When requesting information for unknown hosts, expect a non-zero exit code.