From 9a1e02cf76cc7fe3659d04f631233fa1f7aa2a90 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 5 Sep 2024 14:42:25 +0800 Subject: [PATCH] fix: set query fp not set issue --- source/client/inc/clientInt.h | 1 + source/client/src/clientMain.c | 3 ++- source/client/src/clientStmt.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index cf62ad73b4..9811003254 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -421,6 +421,7 @@ typedef struct SSqlCallbackWrapper { void* pPlanInfo; } SSqlCallbackWrapper; +void setQueryRequest(int64_t rId); SRequestObj* launchQueryImpl(SRequestObj* pRequest, SQuery* pQuery, bool keepQuery, void** res); int32_t scheduleQuery(SRequestObj* pRequest, SQueryPlan* pDag, SArray* pNodeList); void launchAsyncQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaData* pResultMeta, SSqlCallbackWrapper* pWrapper); diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 4a78ce957d..721f995719 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -1235,7 +1235,8 @@ int32_t createParseContext(const SRequestObj *pRequest, SParseContext **pCxt, SS .nodeOffline = (pTscObj->pAppInfo->onlineDnodes < pTscObj->pAppInfo->totalDnodes), .allocatorId = pRequest->allocatorRefId, .parseSqlFp = clientParseSql, - .parseSqlParam = pWrapper}; + .parseSqlParam = pWrapper, + .setQueryFp = setQueryRequest}; int8_t biMode = atomic_load_8(&((STscObj *)pTscObj)->biMode); (*pCxt)->biMode = biMode; return TSDB_CODE_SUCCESS; diff --git a/source/client/src/clientStmt.c b/source/client/src/clientStmt.c index 9f7aeabbe4..52b56abb91 100644 --- a/source/client/src/clientStmt.c +++ b/source/client/src/clientStmt.c @@ -1241,7 +1241,9 @@ int stmtBindBatch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind, int32_t colIdx) { .msgLen = ERROR_MSG_BUF_DEFAULT_SIZE, .pTransporter = pStmt->taos->pAppInfo->pTransporter, .pStmtCb = NULL, - .pUser = pStmt->taos->user}; + .pUser = pStmt->taos->user, + .setQueryFp = setQueryRequest}; + ctx.mgmtEpSet = getEpSet_s(&pStmt->taos->pAppInfo->mgmtEp); STMT_ERR_RET(catalogGetHandle(pStmt->taos->pAppInfo->clusterId, &ctx.pCatalog));