X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fparser%2Fanalyzer.c;h=dea83d7e0c828d8966fbffe9e91a2895c466fdf7;hp=28d312142ddca8a33b580d06b1503d4d2248de7d;hb=1ef0d00327e4b5f56b438f44053f48fd8b198baa;hpb=bbd1b997cf153d54878efebc182bd88f1c64d45c;ds=sidebyside diff --git a/src/parser/analyzer.c b/src/parser/analyzer.c index 28d3121..dea83d7 100644 --- a/src/parser/analyzer.c +++ b/src/parser/analyzer.c @@ -320,7 +320,7 @@ analyze_value(int context, sdb_ast_value_t *v, sdb_strbuf_t *errbuf) } if (context != UNSPEC_CONTEXT) { - /* skip this check if we don't know the context; it's up to the + /* skip these checks if we don't know the context; it's up to the * caller to check again once the right context information is * available */ if ((context != SDB_ATTRIBUTE) && (v->type == SDB_FIELD_VALUE)) { @@ -328,6 +328,11 @@ analyze_value(int context, sdb_ast_value_t *v, sdb_strbuf_t *errbuf) SDB_FIELD_TO_NAME(context)); return -1; } + if ((context != SDB_METRIC) && (v->type == SDB_FIELD_TIMESERIES)) { + sdb_strbuf_sprintf(errbuf, "Invalid expression %s.timeseries", + SDB_FIELD_TO_NAME(context)); + return -1; + } } return 0; } /* analyze_value */