From d5a96d77255ca8ed2e8b36a667abf0812a872bea Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 21 Sep 2021 23:21:23 +0300 Subject: [PATCH] Fix error --- src/Common/Config/ConfigProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/Config/ConfigProcessor.cpp b/src/Common/Config/ConfigProcessor.cpp index 85ce0ff34eb..29514ef9d48 100644 --- a/src/Common/Config/ConfigProcessor.cpp +++ b/src/Common/Config/ConfigProcessor.cpp @@ -236,8 +236,8 @@ void ConfigProcessor::merge(XMLDocumentPtr config, XMLDocumentPtr with) /// For compatibility, we treat 'yandex' and 'clickhouse' equivalent. /// See https://clickhouse.com/blog/en/2021/clickhouse-inc/ - if (config_root_node_name == merged_root_node_name - || ((config_root_node_name == "yandex" || config_root_node_name == "clickhouse") + if (config_root_node_name != merged_root_node_name + && !((config_root_node_name == "yandex" || config_root_node_name == "clickhouse") && (merged_root_node_name == "yandex" || merged_root_node_name == "clickhouse"))) { throw Poco::Exception("Root element doesn't have the corresponding root element as the config file."