Update MaterializedMySQLSyncThread.cpp

This commit is contained in:
tavplubix 2022-01-25 17:25:34 +03:00 committed by GitHub
parent 35534a4b92
commit 9f1da9b8b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@
#include <Databases/MySQL/MaterializeMetadata.h>
#include <Processors/Sources/MySQLSource.h>
#include <IO/ReadBufferFromString.h>
#include <IO/Operators.h>
#include <Interpreters/Context.h>
#include <Interpreters/executeQuery.h>
#include <Storages/StorageMergeTree.h>
@ -331,7 +332,7 @@ static inline String reWriteMysqlQueryColumn(mysqlxx::Pool::Entry & connection,
auto mysql_source = std::make_unique<MySQLSource>(connection, query, tables_columns_sample_block, mysql_input_stream_settings);
Block block;
std::stringstream query_columns;
WriteBufferFromOwnString query_columns;
QueryPipeline pipeline(std::move(mysql_source));
PullingPipelineExecutor executor(pipeline);
while (executor.pull(block))