mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Update ConfigProcessor.cpp
This commit is contained in:
parent
38ecdc0627
commit
f9c3de5aa5
@ -185,7 +185,8 @@ void ConfigProcessor::mergeRecursive(XMLDocumentPtr config, Node * config_root,
|
|||||||
node = next_node;
|
node = next_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Node * with_node = with_nodes->item(0), * next_with_node = nullptr; with_node; with_node = next_with_node)
|
Node * next_with_node = nullptr;
|
||||||
|
for (Node * with_node = with_nodes->item(0); with_node; with_node = next_with_node)
|
||||||
{
|
{
|
||||||
next_with_node = with_node->nextSibling();
|
next_with_node = with_node->nextSibling();
|
||||||
bool merged = false;
|
bool merged = false;
|
||||||
@ -337,7 +338,8 @@ void ConfigProcessor::doIncludesRecursive(
|
|||||||
if (node->nodeName() == "include")
|
if (node->nodeName() == "include")
|
||||||
{
|
{
|
||||||
const NodeListPtr children = node_to_include->childNodes();
|
const NodeListPtr children = node_to_include->childNodes();
|
||||||
for (Node * child = children->item(0), * next_child = nullptr; child; child = next_child)
|
Node * next_child = nullptr;
|
||||||
|
for (Node * child = children->item(0); child; child = next_child)
|
||||||
{
|
{
|
||||||
next_child = child->nextSibling();
|
next_child = child->nextSibling();
|
||||||
NodePtr new_node = config->importNode(child, true);
|
NodePtr new_node = config->importNode(child, true);
|
||||||
@ -362,7 +364,8 @@ void ConfigProcessor::doIncludesRecursive(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const NodeListPtr children = node_to_include->childNodes();
|
const NodeListPtr children = node_to_include->childNodes();
|
||||||
for (Node * child = children->item(0), * next_child = nullptr; child; child = next_child)
|
Node * next_child = nullptr;
|
||||||
|
for (Node * child = children->item(0); child; child = next_child)
|
||||||
{
|
{
|
||||||
next_child = child->nextSibling();
|
next_child = child->nextSibling();
|
||||||
NodePtr new_node = config->importNode(child, true);
|
NodePtr new_node = config->importNode(child, true);
|
||||||
@ -370,7 +373,8 @@ void ConfigProcessor::doIncludesRecursive(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const NamedNodeMapPtr from_attrs = node_to_include->attributes();
|
const NamedNodeMapPtr from_attrs = node_to_include->attributes();
|
||||||
for (Node * attr = from_attrs->item(0), * next_attr = nullptr; attr; attr = next_attr)
|
Node * next_attr = nullptr;
|
||||||
|
for (Node * attr = from_attrs->item(0); attr; attr = next_attr)
|
||||||
{
|
{
|
||||||
next_attr = attr->nextSibling();
|
next_attr = attr->nextSibling();
|
||||||
element.setAttributeNode(dynamic_cast<Attr *>(config->importNode(attr, true)));
|
element.setAttributeNode(dynamic_cast<Attr *>(config->importNode(attr, true)));
|
||||||
@ -435,7 +439,8 @@ void ConfigProcessor::doIncludesRecursive(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
NodeListPtr children = node->childNodes();
|
NodeListPtr children = node->childNodes();
|
||||||
for (Node * child = children->item(0), * next_child = nullptr; child; child = next_child)
|
Node * next_child = nullptr;
|
||||||
|
for (Node * child = children->item(0); child; child = next_child)
|
||||||
{
|
{
|
||||||
next_child = child->nextSibling();
|
next_child = child->nextSibling();
|
||||||
doIncludesRecursive(config, include_from, child, zk_node_cache, zk_changed_event, contributing_zk_paths);
|
doIncludesRecursive(config, include_from, child, zk_node_cache, zk_changed_event, contributing_zk_paths);
|
||||||
|
Loading…
Reference in New Issue
Block a user