From 95adf3ea611be0c62e4b50131d4ed9432eec2ef5 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 17 Oct 2020 23:47:40 +0800 Subject: [PATCH] [td-225] --- src/query/src/qExecutor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index f742616b05..6072b83121 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -6692,12 +6692,12 @@ static bool doBuildResCheck(SQInfo* pQInfo) { pQInfo->dataReady = QUERY_RESULT_READY; buildRes = (pQInfo->rspContext != NULL); - pthread_mutex_unlock(&pQInfo->lock); - - // clear qhandle owner + // clear qhandle owner, it must be in the secure area. other thread may run ahead before current, after it is + // put into task to be executed. assert(pQInfo->owner == taosGetPthreadId()); pQInfo->owner = 0; + pthread_mutex_unlock(&pQInfo->lock); return buildRes; }