提交 0e3d2897 编写于 作者: wmmhello's avatar wmmhello

[TD-12252]<feature>(query)):taosd crash : for illegal SQL such as select *...

[TD-12252]<feature>(query)):taosd crash : for illegal SQL such as select * from st where tag1 >sum(1)
上级 727755ee
......@@ -1577,7 +1577,9 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
SFilterField *left = FILTER_UNIT_LEFT_FIELD(info, unit);
SSchema *sch = left->desc;
len = sprintf(str, "UNIT[%d] => [%d][%s] %s [", i, sch->colId, sch->name, gOptrStr[unit->compare.optr].str);
if (unit->compare.optr >= TSDB_RELATION_INVALID && unit->compare.optr <= TSDB_RELATION_CONTAINS){
len = sprintf(str, "UNIT[%d] => [%d][%s] %s [", i, sch->colId, sch->name, gOptrStr[unit->compare.optr].str);
}
if (unit->right.type == FLD_TYPE_VALUE && FILTER_UNIT_OPTR(unit) != TSDB_RELATION_IN) {
SFilterField *right = FILTER_UNIT_RIGHT_FIELD(info, unit);
......@@ -1594,7 +1596,9 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
if (unit->compare.optr2) {
strcat(str, " && ");
sprintf(str + strlen(str), "[%d][%s] %s [", sch->colId, sch->name, gOptrStr[unit->compare.optr2].str);
if (unit->compare.optr2 >= TSDB_RELATION_INVALID && unit->compare.optr2 <= TSDB_RELATION_CONTAINS){
sprintf(str + strlen(str), "[%d][%s] %s [", sch->colId, sch->name, gOptrStr[unit->compare.optr2].str);
}
if (unit->right2.type == FLD_TYPE_VALUE && FILTER_UNIT_OPTR(unit) != TSDB_RELATION_IN) {
SFilterField *right = FILTER_UNIT_RIGHT2_FIELD(info, unit);
......
......@@ -100,6 +100,8 @@ class TDTestCase:
tdSql.error("select count(*) from st where hostname < tbname")
tdSql.error("select count(*) from st where ts > 0 and tbname in ('d1', 'd2') and tbname-2")
tdSql.query("select count(*) from st where id > 10000000000000")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -20,6 +20,7 @@ python3 ./test.py -f 2-query/TD-12344.py
#python3 ./test.py -f 2-query/TD-12594.py
python3 ./test.py -f 2-query/TD-12614.py
python3 ./test.py -f 2-query/function_elapsed.py
python3 ./test.py -f 2-query/TD-12909.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册