From 1ff7c2ac432c4d5414303012ab7b2d754676bd7e Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Wed, 1 Apr 2020 23:16:50 +0300 Subject: [PATCH] Fix parallel distributed INSERT SELECT for remote table. --- dbms/Interpreters/InterpreterInsertQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/Interpreters/InterpreterInsertQuery.cpp b/dbms/Interpreters/InterpreterInsertQuery.cpp index b4280ee20e6..39b99b10c0d 100644 --- a/dbms/Interpreters/InterpreterInsertQuery.cpp +++ b/dbms/Interpreters/InterpreterInsertQuery.cpp @@ -176,7 +176,7 @@ BlockIO InterpreterInsertQuery::execute() "Expected exactly one connection for shard " + toString(shard_info.shard_num), ErrorCodes::LOGICAL_ERROR); /// INSERT SELECT query returns empty block - auto in_stream = std::make_shared(*connections.front(), new_query_str, Block{}, context); + auto in_stream = std::make_shared(std::move(connections), new_query_str, Block{}, context); in_streams.push_back(in_stream); } out_streams.push_back(std::make_shared(Block()));