From bdb666efeed8ca58174367e8cdd91212214a1533 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 26 Nov 2014 00:11:11 +0300 Subject: [PATCH] Revert "Revert "dbms: fix column names asynchrony in SELECT from StorageDistributed. [#METR-13399]"" This reverts commit 08c41d2abb2e08922c567856ec37038d1fa59e72. --- dbms/src/Storages/StorageDistributed.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/StorageDistributed.cpp b/dbms/src/Storages/StorageDistributed.cpp index e36f96d46ed..25f339f34cb 100644 --- a/dbms/src/Storages/StorageDistributed.cpp +++ b/dbms/src/Storages/StorageDistributed.cpp @@ -21,9 +21,9 @@ namespace { /// select query has database and table names as AST pointers /// Создает копию запроса, меняет имена базы данных и таблицы. - inline ASTPtr rewriteSelectQuery(const ASTPtr & query, const std::string & database, const std::string & table) + inline ASTPtr rewriteSelectQuery(ASTPtr & query, const std::string & database, const std::string & table) { - auto modified_query_ast = query->clone(); + auto & modified_query_ast = query; auto & actual_query = typeid_cast(*modified_query_ast); actual_query.database = new ASTIdentifier{{}, database, ASTIdentifier::Database};