From 8593f0948fd6777d292c0149dce0f7af8fd5ae46 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 14 Jan 2022 14:34:40 +0800 Subject: [PATCH] [TD-12945](query): taos shell crash when constant comparison cause crash --- src/query/src/qSqlParser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index 90303de475..a9f75d1883 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -404,6 +404,8 @@ tSqlExpr *tSqlExprCreate(tSqlExpr *pLeft, tSqlExpr *pRight, int32_t optrType) { tSqlExprDestroy(pRight); } else if ((pLeft->tokenId == TK_FLOAT && pRight->tokenId == TK_INTEGER) || (pLeft->tokenId == TK_INTEGER && pRight->tokenId == TK_FLOAT) || + (pLeft->tokenId == TK_BOOL && pRight->tokenId == TK_FLOAT) || + (pLeft->tokenId == TK_FLOAT && pRight->tokenId == TK_BOOL) || (pLeft->tokenId == TK_FLOAT && pRight->tokenId == TK_FLOAT)) { pExpr->value.nType = TSDB_DATA_TYPE_DOUBLE; pExpr->tokenId = TK_FLOAT; -- GitLab