From 4b672b459ce1f20240f32f3c5d4b8ef7ba888add Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 21 May 2021 17:31:00 +0800 Subject: [PATCH] [td-225] --- src/mnode/src/mnodeTable.c | 6 +++++- tests/script/general/parser/testSuite.sim | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index e35874b585..5297cbaca1 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -2443,8 +2443,8 @@ static int32_t mnodeDoGetChildTableMeta(SMnodeMsg *pMsg, STableMetaMsg *pMeta) { pMeta->vgroup.numOfEps++; mnodeDecDnodeRef(pDnode); } - pMeta->vgroup.vgId = htonl(pMsg->pVgroup->vgId); + pMeta->vgroup.vgId = htonl(pMsg->pVgroup->vgId); mDebug("msg:%p, app:%p table:%s, uid:%" PRIu64 " table meta is retrieved, vgId:%d tid:%d", pMsg, pMsg->rpcMsg.ahandle, pTable->info.tableId, pTable->uid, pTable->vgId, pTable->tid); @@ -2917,6 +2917,8 @@ static int32_t mnodeProcessMultiTableMetaMsg(SMnodeMsg *pMsg) { } mnodeDecTableRef(pMsg->pTable); + assert(((SCTableObj*)pMsg->pTable)->refCount >= 1); + pMsg->pTable = NULL; } char* msg = (char*) pMultiMeta + pMultiMeta->contLen; @@ -2932,6 +2934,7 @@ static int32_t mnodeProcessMultiTableMetaMsg(SMnodeMsg *pMsg) { for(int32_t i = 0; i < numOfVgroupList; ++i) { char* name = taosArrayGetP(pList, i); + SSTableObj *pTable = mnodeGetSuperTable(name); if (pTable == NULL) { mError("msg:%p, app:%p stable:%s, not exist while get stable vgroup info", pMsg, pMsg->rpcMsg.ahandle, name); @@ -2955,6 +2958,7 @@ static int32_t mnodeProcessMultiTableMetaMsg(SMnodeMsg *pMsg) { tfree(nameList); rpcFreeCont(pMultiMeta); taosArrayDestroy(pList); + pMsg->pTable = NULL; return code; } diff --git a/tests/script/general/parser/testSuite.sim b/tests/script/general/parser/testSuite.sim index d7c6bd4819..f263593b3d 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -1,14 +1,14 @@ -#run general/parser/alter.sim -#run general/parser/alter1.sim -#run general/parser/alter_stable.sim -#run general/parser/auto_create_tb.sim -#run general/parser/auto_create_tb_drop_tb.sim -#run general/parser/col_arithmetic_operation.sim -#run general/parser/columnValue.sim -#run general/parser/commit.sim -#run general/parser/create_db.sim -#run general/parser/create_mt.sim -#run general/parser/create_tb.sim +run general/parser/alter.sim +run general/parser/alter1.sim +run general/parser/alter_stable.sim +run general/parser/auto_create_tb.sim +run general/parser/auto_create_tb_drop_tb.sim +run general/parser/col_arithmetic_operation.sim +run general/parser/columnValue.sim +run general/parser/commit.sim +run general/parser/create_db.sim +run general/parser/create_mt.sim +run general/parser/create_tb.sim run general/parser/dbtbnameValidate.sim run general/parser/fill.sim run general/parser/fill_stb.sim -- GitLab