From 0ccf417e4f8a8742f963f7707965b5d329f342c3 Mon Sep 17 00:00:00 2001 From: xywang Date: Thu, 16 Jun 2022 15:35:54 +0800 Subject: [PATCH] fix: added upstream check to avoid crash --- src/client/src/tscUtil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 11b51f97bd..15ae41f9b4 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -4236,7 +4236,8 @@ void executeQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) { tscAddIntoSqlList(pSql); } - if (taosArrayGetSize(pQueryInfo->pUpstream) > 0) { // nest query. do execute it firstly + // upstream may be freed before retry + if (pQueryInfo->pUpstream && taosArrayGetSize(pQueryInfo->pUpstream) > 0) { // nest query. do execute it firstly code = doInitSubState(pSql, (int32_t) taosArrayGetSize(pQueryInfo->pUpstream)); if (code != TSDB_CODE_SUCCESS) { goto _error; -- GitLab