diff --git a/src/query/inc/tsqlfunction.h b/src/query/inc/tsqlfunction.h index aa8e83da380a752ca58857129b5ca17a38cc016b..340f6bc4f326bc7105b12b285c3edf60b88063ec 100644 --- a/src/query/inc/tsqlfunction.h +++ b/src/query/inc/tsqlfunction.h @@ -112,7 +112,7 @@ enum { #define QUERY_IS_STABLE_QUERY(type) (((type)&TSDB_QUERY_TYPE_STABLE_QUERY) != 0) #define QUERY_IS_JOIN_QUERY(type) (TSDB_QUERY_HAS_TYPE(type, TSDB_QUERY_TYPE_JOIN_QUERY)) -#define QUERY_IS_PROJECTION_QUERY(type) (((type)&TSDB_QUERY_TYPE_PROJECTION_QUERY) != 0) +#define QUERY_IS_PROJECTION_QUERY(type) (((type)&TSDB_QUERY_TYPE_PROJECTION_QUERY) != 0) #define QUERY_IS_FREE_RESOURCE(type) (((type)&TSDB_QUERY_TYPE_FREE_RESOURCE) != 0) typedef struct SArithmeticSupport { diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 57ab593b17aaaca8619c0b740799ce3dc26e33e7..539521d5bc64089dd98442771a1d1d9b8122f2c4 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4470,7 +4470,7 @@ static void multiTableQueryProcess(SQInfo *pQInfo) { // query error occurred or query is killed, abort current execution if (pQInfo->code != TSDB_CODE_SUCCESS || isQueryKilled(pQInfo)) { - qTrace("QInfo:%p query killed or error occurred, code:%d, abort", pQInfo, pQInfo->code); + qTrace("QInfo:%p query killed or error occurred, code:%s, abort", pQInfo, tstrerror(pQInfo->code)); return; } @@ -4491,7 +4491,7 @@ static void multiTableQueryProcess(SQInfo *pQInfo) { setQueryStatus(pQuery, QUERY_COMPLETED); if (pQInfo->code != TSDB_CODE_SUCCESS || isQueryKilled(pQInfo)) { - qTrace("QInfo:%p query killed or error occurred, code:%d, abort", pQInfo, pQInfo->code); + qTrace("QInfo:%p query killed or error occurred, code:%s, abort", pQInfo, tstrerror(pQInfo->code)); return; } @@ -5851,6 +5851,8 @@ void qDestroyQueryInfo(qinfo_t qHandle) { } int16_t ref = T_REF_DEC(pQInfo); + qTrace("QInfo:%p dec refCount, value:%d", pQInfo, ref); + if (ref == 0) { doDestoryQueryInfo(pQInfo); } diff --git a/src/vnode/src/vnodeRead.c b/src/vnode/src/vnodeRead.c index 29f8d887d1183814c0b1a714e1ae22104b65cf16..17b5d17bee93b1660156a09acfc89ce3622d3ad8 100644 --- a/src/vnode/src/vnodeRead.c +++ b/src/vnode/src/vnodeRead.c @@ -86,8 +86,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SReadMsg *pReadMsg) { killQueryMsg->qhandle = htobe64(killQueryMsg->qhandle); assert(pReadMsg->rpcMsg.contLen > 0 && killQueryMsg->free == 1); - qDestroyQueryInfo((qinfo_t) killQueryMsg->qhandle); - + qKillQuery((qinfo_t) killQueryMsg->qhandle); return TSDB_CODE_SUCCESS; }