From a405c1a06a1067395dcef7c71b90ab983076dced Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 17 Jan 2022 10:49:41 +0800 Subject: [PATCH] [TD-12861](query): taoshell crash : coredump for such as "select first(c1)==max(c1) from st" --- src/query/src/qSqlParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index f927287015..6140abdaca 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -505,7 +505,7 @@ tSqlExpr *tSqlExprClone(tSqlExpr *pSrc) { tSqlExpr *pExpr = calloc(1, sizeof(tSqlExpr)); memcpy(pExpr, pSrc, sizeof(*pSrc)); - + if (pSrc->pLeft) { pExpr->pLeft = tSqlExprClone(pSrc->pLeft); } @@ -518,7 +518,7 @@ tSqlExpr *tSqlExprClone(tSqlExpr *pSrc) { tVariantAssign(&pExpr->value, &pSrc->value); //we don't clone paramList now because clone is only used for between/and - assert(pSrc->Expr.paramList == NULL); + pSrc->Expr.paramList = NULL; return pExpr; } -- GitLab