From 329f065ef57a799bb7e800483b9afede65ef5ee5 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 28 Apr 2021 10:19:33 +0800 Subject: [PATCH] [td-225]fix the bug found by regression test. --- src/client/src/tscServer.c | 3 +-- src/client/src/tscSubquery.c | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 3343f0a0ca..16b40f54bd 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2071,8 +2071,7 @@ int tscProcessSTableVgroupRsp(SSqlObj *pSql) { pInfo->vgroupList->numOfVgroups = pVgroupMsg->numOfVgroups; if (pInfo->vgroupList->numOfVgroups <= 0) { - //tfree(pInfo->vgroupList); - tscError("0x%"PRIx64" empty vgroup info", pSql->self); + tscDebug("0x%"PRIx64" empty vgroup info, no corresponding tables for stable", pSql->self); } else { for (int32_t j = 0; j < pInfo->vgroupList->numOfVgroups; ++j) { // just init, no need to lock diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 14683090e6..a734023728 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -84,13 +84,18 @@ static bool allSubqueryDone(SSqlObj *pParentSql) { //lock in caller tscDebug("0x%"PRIx64" total subqueries: %d", pParentSql->self, subState->numOfSub); for (int i = 0; i < subState->numOfSub; i++) { + SSqlObj* pSub = pParentSql->pSubs[i]; if (0 == subState->states[i]) { tscDebug("0x%"PRIx64" subquery:0x%"PRIx64", index: %d NOT finished, abort query completion check", pParentSql->self, - pParentSql->pSubs[i]->self, i); + pSub->self, i); done = false; break; } else { - tscDebug("0x%"PRIx64" subquery:0x%"PRIx64", index: %d finished", pParentSql->self, pParentSql->pSubs[i]->self, i); + if (pSub != NULL) { + tscDebug("0x%"PRIx64" subquery:0x%"PRIx64", index: %d finished", pParentSql->self, pSub->self, i); + } else { + tscDebug("0x%"PRIx64" subquery:%p, index: %d finished", pParentSql->self, pSub, i); + } } } -- GitLab