diff --git a/client/dump/sql_formatter.cc b/client/dump/sql_formatter.cc index e7e281a2f0d..91ba61d162d 100644 --- a/client/dump/sql_formatter.cc +++ b/client/dump/sql_formatter.cc @@ -295,8 +295,6 @@ void Sql_formatter::format_dump_start( << "SET @OLD_SQL_MODE=@@SQL_MODE;\n" "SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\";\n"; - /* disable binlog */ - out << "SET @@SESSION.SQL_LOG_BIN= 0;\n"; if (m_options->m_timezone_consistent) out << "SET @OLD_TIME_ZONE=@@TIME_ZONE;\n" @@ -345,6 +343,8 @@ void Sql_formatter::format_dump_start( Mysql::Tools::Base::Message_type_error)); return; } + /* disable binlog */ + out << "SET @@SESSION.SQL_LOG_BIN= 0;\n"; std::string gtid_output("SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '"); gtid_output += (dump_start_dump_task->m_gtid_executed + "';\n"); out << gtid_output;