Commit dcd4fa3f authored by Sujatha Sivakumar's avatar Sujatha Sivakumar

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.
parent 889ce031
...@@ -476,7 +476,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, ...@@ -476,7 +476,8 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
heartbeat_ts= &heartbeat_buf; heartbeat_ts= &heartbeat_buf;
set_timespec_nsec(*heartbeat_ts, 0); 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); thd->server_id, log_ident, (ulong)pos);
if (RUN_HOOK(binlog_transmit, transmit_start, (thd, flags, log_ident, pos))) if (RUN_HOOK(binlog_transmit, transmit_start, (thd, flags, log_ident, pos)))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment