From 5842d3573d4f6ff94aefb02a8d7ba23706efc967 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 23 Aug 2021 15:49:41 +0300 Subject: [PATCH] Fix throw without exception in MySQL source. --- src/Formats/MySQLSource.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Formats/MySQLSource.cpp b/src/Formats/MySQLSource.cpp index 2d305a29df6..e6cb9f5ff11 100644 --- a/src/Formats/MySQLSource.cpp +++ b/src/Formats/MySQLSource.cpp @@ -100,12 +100,12 @@ void MySQLWithFailoverSource::onStart() catch (const mysqlxx::ConnectionLost & ecl) /// There are two retriable failures: CR_SERVER_GONE_ERROR, CR_SERVER_LOST { LOG_WARNING(log, "Failed connection ({}/{}). Trying to reconnect... (Info: {})", count_connect_attempts, settings->default_num_tries_on_connection_loss, ecl.displayText()); - } - if (++count_connect_attempts > settings->default_num_tries_on_connection_loss) - { - LOG_ERROR(log, "Failed to create connection to MySQL. ({}/{})", count_connect_attempts, settings->default_num_tries_on_connection_loss); - throw; + if (++count_connect_attempts > settings->default_num_tries_on_connection_loss) + { + LOG_ERROR(log, "Failed to create connection to MySQL. ({}/{})", count_connect_attempts, settings->default_num_tries_on_connection_loss); + throw; + } } }