提交 7593fc6a 编写于 作者: X Xiaoyu Wang

bugfix

上级 9f93b1eb
......@@ -481,8 +481,7 @@ void nodesDestroyNode(SNodeptr pNode) {
SVnodeModifLogicNode* pLogicNode = (SVnodeModifLogicNode*)pNode;
destroyLogicNode((SLogicNode*)pLogicNode);
destroyVgDataBlockArray(pLogicNode->pDataBlocks);
taosMemoryFreeClear(pLogicNode->pVgDataBlocks->pData);
taosMemoryFreeClear(pLogicNode->pVgDataBlocks);
// pVgDataBlocks is weak reference
break;
}
case QUERY_NODE_LOGIC_PLAN_EXCHANGE:
......@@ -512,6 +511,7 @@ void nodesDestroyNode(SNodeptr pNode) {
SLogicSubplan* pSubplan = (SLogicSubplan*)pNode;
nodesDestroyList(pSubplan->pChildren);
nodesDestroyNode(pSubplan->pNode);
nodesClearList(pSubplan->pParents);
taosMemoryFreeClear(pSubplan->pVgroupList);
break;
}
......@@ -591,11 +591,28 @@ void nodesDestroyNode(SNodeptr pNode) {
nodesDestroyList(pSubplan->pChildren);
nodesDestroyNode(pSubplan->pNode);
nodesDestroyNode(pSubplan->pDataSink);
nodesClearList(pSubplan->pParents);
break;
}
case QUERY_NODE_PHYSICAL_PLAN: {
SQueryPlan* pPlan = (SQueryPlan*)pNode;
if (NULL != pPlan->pSubplans) {
// only need to destroy the top-level subplans, because they will recurse to all the subplans below
bool first = true;
SNode* pElement = NULL;
FOREACH(pElement, pPlan->pSubplans) {
if (first) {
first = false;
nodesDestroyNode(pElement);
} else {
nodesClearList(((SNodeListNode*)pElement)->pNodeList);
taosMemoryFreeClear(pElement);
}
}
nodesClearList(pPlan->pSubplans);
}
break;
}
case QUERY_NODE_PHYSICAL_PLAN:
nodesDestroyList(((SQueryPlan*)pNode)->pSubplans);
break;
default:
break;
}
......
......@@ -692,7 +692,7 @@ static int32_t createVnodeModifLogicNode(SLogicPlanContext* pCxt, SVnodeModifOpS
if (NULL == pModif) {
return TSDB_CODE_OUT_OF_MEMORY;
}
pModif->pDataBlocks = pStmt->pDataBlocks;
TSWAP(pModif->pDataBlocks, pStmt->pDataBlocks, SArray*);
pModif->msgType = getMsgType(pStmt->sqlNodeType);
*pLogicNode = (SLogicNode*)pModif;
return TSDB_CODE_SUCCESS;
......
......@@ -1083,7 +1083,11 @@ static int32_t doCreatePhysiPlan(SPhysiPlanContext* pCxt, SQueryLogicPlan* pLogi
static void destoryLocationHash(void* p) {
SHashObj* pHash = *(SHashObj**)p;
// todo
SSlotIndex* pIndex = taosHashIterate(pHash, NULL);
while (NULL != pIndex) {
taosArrayDestroy(pIndex->pSlotIdsInfo);
pIndex = taosHashIterate(pHash, pIndex);
}
taosHashCleanup(pHash);
}
......
......@@ -140,6 +140,7 @@ static int32_t stsSplit(SSplitContext* pCxt) {
code = stsCreateExchangeNode(pCxt, pInfo->pSubplan, pInfo->pScan);
}
++(pCxt->groupId);
taosMemoryFreeClear(pCxt->pInfo);
return code;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册