From 0ee16c41782c323bfe1e754ea80f038fc4accb99 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 11 Jun 2020 21:54:28 +0800 Subject: [PATCH] [td-225] fix bugs in async query release --- src/client/src/tscServer.c | 4 ++-- src/client/src/tscUtil.c | 21 +-------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 465100837f..35a31eccd4 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -375,7 +375,7 @@ int tscProcessSql(SSqlObj *pSql) { SQueryInfo * pQueryInfo = tscGetQueryInfoDetail(pCmd, pCmd->clauseIndex); STableMetaInfo *pTableMetaInfo = NULL; - uint16_t type = 0; + uint32_t type = 0; if (pQueryInfo != NULL) { pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0); @@ -424,7 +424,7 @@ void tscKillSTableQuery(SSqlObj *pSql) { * sub-queries not correctly released and master sql object of super table query reaches an abnormal state. */ pSql->pSubs[i]->res.code = TSDB_CODE_TSC_QUERY_CANCELLED; - //taosStopRpcConn(pSql->pSubs[i]->thandle); +// taosStopRpcConn(pSql->pSubs[i]->); } /* diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 2701d2b572..57634e73fd 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -134,24 +134,6 @@ void tscGetDBInfoFromMeterId(char* tableId, char* db) { db[0] = 0; } -//STableIdInfo* tscGetMeterSidInfo(SVnodeSidList* pSidList, int32_t idx) { -// if (pSidList == NULL) { -// tscError("illegal sidlist"); -// return 0; -// } -// -// if (idx < 0 || idx >= pSidList->numOfSids) { -// int32_t sidRange = (pSidList->numOfSids > 0) ? (pSidList->numOfSids - 1) : 0; -// -// tscError("illegal sidIdx:%d, reset to 0, sidIdx range:%d-%d", idx, 0, sidRange); -// idx = 0; -// } -// -// assert(pSidList->pSidExtInfoList[idx] >= 0); -// -// return (STableIdInfo*)(pSidList->pSidExtInfoList[idx] + (char*)pSidList); -//} - bool tscIsTwoStageSTableQuery(SQueryInfo* pQueryInfo, int32_t tableIndex) { if (pQueryInfo == NULL) { return false; @@ -176,8 +158,7 @@ bool tscIsTwoStageSTableQuery(SQueryInfo* pQueryInfo, int32_t tableIndex) { return false; } - if (((pQueryInfo->type & TSDB_QUERY_TYPE_STABLE_SUBQUERY) != TSDB_QUERY_TYPE_STABLE_SUBQUERY) && - pQueryInfo->command == TSDB_SQL_SELECT) { + if (!TSDB_QUERY_HAS_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_STABLE_SUBQUERY) && pQueryInfo->command == TSDB_SQL_SELECT) { return UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo); } -- GitLab