mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
add clone() calls when copying ASTs from stored mutation commands (just in case) #4058
This commit is contained in:
parent
da0f555484
commit
b623d4302c
@ -53,7 +53,7 @@ bool MutationsInterpreter::isStorageTouchedByMutations() const
|
||||
select->select_expression_list->children.push_back(count_func);
|
||||
|
||||
if (commands.size() == 1)
|
||||
select->where_expression = commands[0].predicate;
|
||||
select->where_expression = commands[0].predicate->clone();
|
||||
else
|
||||
{
|
||||
auto coalesced_predicates = std::make_shared<ASTFunction>();
|
||||
@ -62,7 +62,7 @@ bool MutationsInterpreter::isStorageTouchedByMutations() const
|
||||
coalesced_predicates->children.push_back(coalesced_predicates->arguments);
|
||||
|
||||
for (const MutationCommand & command : commands)
|
||||
coalesced_predicates->arguments->children.push_back(command.predicate);
|
||||
coalesced_predicates->arguments->children.push_back(command.predicate->clone());
|
||||
|
||||
select->where_expression = std::move(coalesced_predicates);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user