From d8cd39d012c499120e29601a9e14a85878be5b60 Mon Sep 17 00:00:00 2001 From: slzhou Date: Sun, 20 Nov 2022 23:02:17 +0800 Subject: [PATCH] fix: fix parameter initialization when cleanup during qCreateQueryInfo --- src/query/src/queryMain.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index 85e60929d9..ed63d0f65c 100644 --- a/src/query/src/queryMain.c +++ b/src/query/src/queryMain.c @@ -71,6 +71,13 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryMsg, qi assert(pQueryMsg != NULL && tsdb != NULL); int32_t code = TSDB_CODE_SUCCESS; + + SQueryParam param = {0}; + code = convertQueryMsg(pQueryMsg, ¶m); + if (code != TSDB_CODE_SUCCESS) { + goto _over; + } + float procMemory = 0; if (taosGetProcMemory(&procMemory)) { if (tsQueryRssThreshold > 0 && procMemory >= tsQueryRssThreshold) { @@ -80,12 +87,6 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryMsg, qi } } - SQueryParam param = {0}; - code = convertQueryMsg(pQueryMsg, ¶m); - if (code != TSDB_CODE_SUCCESS) { - goto _over; - } - if (pQueryMsg->numOfTables <= 0) { qError("Invalid number of tables to query, numOfTables:%d", pQueryMsg->numOfTables); code = TSDB_CODE_QRY_INVALID_MSG; -- GitLab