提交 2774799d 编写于 作者: D dapan1121

fix: duplicated explain response issue

上级 bb052b81
...@@ -127,6 +127,7 @@ typedef struct SQWTaskCtx { ...@@ -127,6 +127,7 @@ typedef struct SQWTaskCtx {
bool queryRsped; bool queryRsped;
bool queryEnd; bool queryEnd;
bool queryContinue; bool queryContinue;
bool queryExecDone;
bool queryInQueue; bool queryInQueue;
int32_t rspCode; int32_t rspCode;
int64_t affectedRows; // for insert ...select stmt int64_t affectedRows; // for insert ...select stmt
......
...@@ -59,6 +59,8 @@ static void freeItem(void *param) { ...@@ -59,6 +59,8 @@ static void freeItem(void *param) {
int32_t qwHandleTaskComplete(QW_FPARAMS_DEF, SQWTaskCtx *ctx) { int32_t qwHandleTaskComplete(QW_FPARAMS_DEF, SQWTaskCtx *ctx) {
qTaskInfo_t taskHandle = ctx->taskHandle; qTaskInfo_t taskHandle = ctx->taskHandle;
ctx->queryExecDone = true;
if (TASK_TYPE_TEMP == ctx->taskType && taskHandle) { if (TASK_TYPE_TEMP == ctx->taskType && taskHandle) {
if (ctx->explain) { if (ctx->explain) {
SArray *execInfoList = taosArrayInit(4, sizeof(SExplainExecInfo)); SArray *execInfoList = taosArrayInit(4, sizeof(SExplainExecInfo));
...@@ -116,6 +118,14 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) { ...@@ -116,6 +118,14 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) {
DataSinkHandle sinkHandle = ctx->sinkHandle; DataSinkHandle sinkHandle = ctx->sinkHandle;
SLocalFetch localFetch = {(void *)mgmt, ctx->localExec, qWorkerProcessLocalFetch, ctx->explainRes}; SLocalFetch localFetch = {(void *)mgmt, ctx->localExec, qWorkerProcessLocalFetch, ctx->explainRes};
if (ctx->queryExecDone) {
if (queryStop) {
*queryStop = true;
}
return TSDB_CODE_SUCCESS;
}
SArray *pResList = taosArrayInit(4, POINTER_BYTES); SArray *pResList = taosArrayInit(4, POINTER_BYTES);
while (true) { while (true) {
QW_TASK_DLOG("start to execTask, loopIdx:%d", i++); QW_TASK_DLOG("start to execTask, loopIdx:%d", i++);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册