From e0efc2c39a14337f9c3af03af1cec93d073e82f3 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Tue, 12 Nov 2013 22:09:10 +0530 Subject: [PATCH] Bug#17641586 INCORRECTLY PRINTED BINLOG DUMP INFORMATION Problem: When log_warnings is greater than 1, master prints binlog dump thread information in mysqld.1.err file. The information contains slave server id, binlog file and binlog position. The slave server id is uint32 and the print format was wrongly specifified (%d instead of %u). Hence a server id which is more than 2 billion is getting printed with a negative value. Eg: Start binlog_dump to slave_server(-1340259414), pos(mysql-bin.001663, 325187493) Fix: Changed the uint32 format to %u. --- sql/sql_repl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 0ccabfe74e7..ec1ef72cd73 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -476,7 +476,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, set_timespec_nsec(*heartbeat_ts, 0); } if (global_system_variables.log_warnings > 1) - sql_print_information("Start binlog_dump to slave_server(%d), pos(%s, %lu)", + sql_print_information("Start binlog_dump to slave_server(%u), pos(%s, %lu)", thd->server_id, log_ident, (ulong)pos); if (RUN_HOOK(binlog_transmit, transmit_start, (thd, flags, log_ident, pos))) {