From 9748220c25620aa4ec83f7680d77bc10c45dca38 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, 1 insertion(+), 1 deletion(-) diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index c554652214..e00e3b80ea 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -501,7 +501,7 @@ tSqlExpr *tSqlExprCreate(tSqlExpr *pLeft, tSqlExpr *pRight, int32_t optrType) { case TK_OR: { pExpr->tokenId = TK_INTEGER; pExpr->value.nType = TSDB_DATA_TYPE_BIGINT; - pExpr->value.i64 = (left && right) ? 1 : 0; + pExpr->value.i64 = (left || right) ? 1 : 0; break; } } -- GitLab