From c0db408c3868373e321b9002f35ef4d62c238dd8 Mon Sep 17 00:00:00 2001 From: zhang2014 Date: Tue, 21 Jul 2020 02:33:28 +0800 Subject: [PATCH] ISSUES-4006 try fix build failure --- src/Databases/MySQL/MaterializeMySQLSyncThread.cpp | 3 ++- src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Databases/MySQL/MaterializeMySQLSyncThread.cpp b/src/Databases/MySQL/MaterializeMySQLSyncThread.cpp index e1f07fe7373..6a036f9adab 100644 --- a/src/Databases/MySQL/MaterializeMySQLSyncThread.cpp +++ b/src/Databases/MySQL/MaterializeMySQLSyncThread.cpp @@ -386,7 +386,8 @@ static void writeFieldsToColumn( return true; }; - const auto & write_data_to_column = [&](auto * casted_column, auto from_type, auto to_type) { + const auto & write_data_to_column = [&](auto * casted_column, auto from_type, auto to_type) + { for (size_t index = 0; index < rows_data.size(); ++index) { const Field & value = DB::get(rows_data[index])[column_index]; diff --git a/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp b/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp index 96a2bb6e63a..b86598f927e 100644 --- a/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp +++ b/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp @@ -185,7 +185,7 @@ static ASTPtr getPartitionPolicy(const NamesAndTypesList & primary_keys) }; ASTPtr best_partition; - size_t index = 0, best_size = 0; + size_t best_size = 0; for (const auto & primary_key : primary_keys) { DataTypePtr type = primary_key.type;