From f159be383226ac7df03182b5303483026689a9fd Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 1 Mar 2018 07:42:18 +0300 Subject: [PATCH] Fixed error #1947 --- dbms/src/Interpreters/InterpreterSelectQuery.cpp | 4 ++-- dbms/src/Interpreters/InterpreterSelectQuery.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index bcc4753b95..d583c9afa2 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -72,7 +72,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( QueryProcessingStage::Enum to_stage_, size_t subquery_depth_, const BlockInputStreamPtr & input) - : query_ptr(query_ptr_) + : query_ptr(query_ptr_->clone()) , query(typeid_cast(*query_ptr)) , context(context_) , to_stage(to_stage_) @@ -85,7 +85,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( InterpreterSelectQuery::InterpreterSelectQuery(OnlyAnalyzeTag, const ASTPtr & query_ptr_, const Context & context_) - : query_ptr(query_ptr_) + : query_ptr(query_ptr_->clone()) , query(typeid_cast(*query_ptr)) , context(context_) , to_stage(QueryProcessingStage::Complete) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.h b/dbms/src/Interpreters/InterpreterSelectQuery.h index 78651d9cb7..2150672e2c 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.h +++ b/dbms/src/Interpreters/InterpreterSelectQuery.h @@ -26,7 +26,6 @@ public: /** * query_ptr * - A query AST to interpret. - * NOTE: The interpreter can modify the query during the execution. If this is undesirable, clone the query. * * to_stage * - the stage to which the query is to be executed. By default - till to the end. -- GitLab