diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index 85e60929d9db72f063a791bea035bcc30451a376..ed63d0f65c7462adcd2673b7585fe890c52afee6 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;