diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index e35874b585d9e25733cedf7dcf6d096836b627ca..5297cbaca16c23b54ef5b660e0525bb43fcaa336 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 d7c6bd4819733de6aa5c23838bff1ff6e05f1dee..f263593b3d70fe35144ed2667b879c6c89601fb7 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