From 04238b8ff15464d625b7ac77cf74b68b4c85d393 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Tue, 24 May 2022 19:22:06 +0800 Subject: [PATCH] fix crash issue --- source/libs/scheduler/src/schJob.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/libs/scheduler/src/schJob.c b/source/libs/scheduler/src/schJob.c index 52722d819f..d64c944994 100644 --- a/source/libs/scheduler/src/schJob.c +++ b/source/libs/scheduler/src/schJob.c @@ -53,8 +53,10 @@ int32_t schInitJob(SSchJob **pSchJob, SQueryPlan *pDag, void *pTrans, SArray *pN pJob->attr.syncSchedule = syncSchedule; pJob->pTrans = pTrans; pJob->sql = sql; - pJob->userRes = *pRes; - + if (pRes) { + pJob->userRes = *pRes; + } + if (pNodeList != NULL) { pJob->nodeList = taosArrayDup(pNodeList); } @@ -1393,7 +1395,9 @@ int32_t schExecStaticExplainJob(void *pTrans, SArray *pNodeList, SQueryPlan *pDa pJob->attr.explainMode = pDag->explainInfo.mode; pJob->queryId = pDag->queryId; pJob->subPlans = pDag->pSubplans; - pJob->userRes = *pRes; + if (pRes) { + pJob->userRes = *pRes; + } SCH_ERR_JRET(qExecStaticExplain(pDag, (SRetrieveTableRsp **)&pJob->resData)); -- GitLab