From cba5cba57391668f8c1080ef881730f48096b4ce Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 22 Nov 2021 14:40:45 +0800 Subject: [PATCH] [TD-10809]: client assertion failure in doInitSubState --- src/client/src/tscServer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 52a918bbe2..1e0b2b898d 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -3076,12 +3076,16 @@ int tscRenewTableMeta(SSqlObj *pSql, int32_t tableIndex) { pSql->rootObj->retryReason = pSql->retryReason; + SSqlObj *tmpSql = pSql->rootObj; + tscFreeSubobj(pSql->rootObj); + tfree(tmpSql->pSubs); + SArray* pNameList = taosArrayInit(1, POINTER_BYTES); SArray* vgroupList = taosArrayInit(1, POINTER_BYTES); char* n = strdup(name); taosArrayPush(pNameList, &n); - code = getMultiTableMetaFromMnode(pSql, pNameList, vgroupList, NULL, tscTableMetaCallBack, true); + code = getMultiTableMetaFromMnode(tmpSql, pNameList, vgroupList, NULL, tscTableMetaCallBack, true); taosArrayDestroyEx(pNameList, freeElem); taosArrayDestroyEx(vgroupList, freeElem); -- GitLab