diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 77cda347a4..b6c5701915 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -336,6 +336,7 @@ void *createRequest(uint64_t connId, int32_t type, int64_t reqid) { pRequest->pDb = getDbOfConnection(pTscObj); pRequest->pTscObj = pTscObj; + pRequest->inCallback = false; pRequest->msgBuf = taosMemoryCalloc(1, ERROR_MSG_BUF_DEFAULT_SIZE); pRequest->msgBufLen = ERROR_MSG_BUF_DEFAULT_SIZE; diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index f2111eb2a2..28a29c2138 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1711,6 +1711,7 @@ void* doAsyncFetchRows(SRequestObj* pRequest, bool setupOneRowPtr, bool convertU taos_fetch_rows_a(pRequest, syncFetchFn, &sem); tsem_wait(&sem); tsem_destroy(&sem); + pRequest->inCallback = false; } if (pResultInfo->numOfRows == 0 || pRequest->code != TSDB_CODE_SUCCESS) { @@ -2490,6 +2491,7 @@ TAOS_RES* taosQueryImpl(TAOS* taos, const char* sql, bool validateOnly) { if (param->pRequest != NULL) { param->pRequest->syncQuery = true; pRequest = param->pRequest; + param->pRequest->inCallback = false; } taosMemoryFree(param);