From 1f6c6b119dbec831277edc5ddfeced4fcad639a6 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 27 May 2022 18:40:41 +0800 Subject: [PATCH] fix(query): fix csum function more than 1 param crash TD-16065 --- source/libs/function/src/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index f600341ed7..b851aedfc0 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -484,7 +484,7 @@ static int32_t translateStateDuration(SFunctionNode* pFunc, char* pErrBuf, int32 static int32_t translateCsum(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { - return TSDB_CODE_SUCCESS; + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } SNode* pPara = nodesListGetNode(pFunc->pParameterList, 0); -- GitLab