From e264eb87ccf29bfd87fcfe606c828d2b407f08c7 Mon Sep 17 00:00:00 2001 From: Sujatha Sivakumar Date: Thu, 24 May 2012 16:25:07 +0530 Subject: [PATCH] Bug#13833962:DISABLE [NOTE] START BINLOG_DUMP TO SLAVE_SERVER(0) MESSAGES IN THE ERROR LOG Problem: Using mysqlbinlog with the --read-from-remote-server option as shown below prints a message in error log for each call. This happens for 5.5 and above versions mysqlbinlog -uroot -p --read-from-remote-server --host=localhost test Message in error log file is given below: 120312 10:27:57 [Note] Start binlog_dump to slave_server(0), pos(test, 4) The problem is that it can fill up the error log if the command is called very often. Analysis: The below mentioned print function is called from "mysql_binlog_send" function which causes the "Start binlog_dump..." string to be printed in error log file. sql_print_information("Start binlog_dump to master_thread_id(%lu) slave_server(%d)..." Fix: A condition has been added in such a way that the 'sql_print_information' will be invoked only when the "log_warnings" variable is set to >1 otherwise don't call the 'sql_print_information' function. --- sql/sql_repl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index ffc7aa4bf8a..5968c17f871 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -476,7 +476,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, heartbeat_ts= &heartbeat_buf; set_timespec_nsec(*heartbeat_ts, 0); } - sql_print_information("Start binlog_dump to slave_server(%d), pos(%s, %lu)", + if (global_system_variables.log_warnings > 1) + sql_print_information("Start binlog_dump to slave_server(%d), pos(%s, %lu)", thd->server_id, log_ident, (ulong)pos); if (RUN_HOOK(binlog_transmit, transmit_start, (thd, flags, log_ident, pos))) {