diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 8e579ad2210920c442a4c447c2fed267b658b546..018a2964b2711da3fd5f678755a7eebbec205dec 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1716,6 +1716,7 @@ void tscFetchDatablockForSubquery(SSqlObj* pSql) { STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0); if (pRes1->row >= pRes1->numOfRows) { + assert(pSql1->cmd.msgType == TSDB_MSG_TYPE_FETCH); tscDebug("0x%"PRIx64" subquery:0x%"PRIx64" retrieve data from vnode, subquery:%d, vgroupIndex:%d", pSql->self, pSql1->self, pSupporter->subqueryIndex, pTableMetaInfo->vgroupIndex); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 0e414e36c884b0a1866f0a735cf235121eb63065..a71ed588dba32ffae12408b289bda21dea112f8e 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1516,6 +1516,8 @@ void tscFreeSqlObj(SSqlObj* pSql) { return; } + int64_t sid = pSql->self; + tscDebug("0x%"PRIx64" start to free sqlObj", pSql->self); pSql->res.code = TSDB_CODE_TSC_QUERY_CANCELLED; @@ -1547,6 +1549,8 @@ void tscFreeSqlObj(SSqlObj* pSql) { tfree(pCmd->payload); pCmd->allocSize = 0; + tscDebug("0x%"PRIx64" addr:%p free completed", sid, pSql); + tsem_destroy(&pSql->rspSem); memset(pSql, 0, sizeof(*pSql)); free(pSql);