From 9dd6da1e8cfc66ec30d166a10f89444abbe9bc4e Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Fri, 14 Oct 2011 14:24:15 +0100 Subject: [PATCH] Introduced this code to make the gcc 4.6.1 compiler happy. When warnings are converted to errors, the compiler complains about the fact that binlog_can_be_corrupted is defined but never used. We need to check if this is a dead code or if someone removed any code by mistake. --- sql/sql_repl.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index a37e8700e4f..80fef42434c 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -720,6 +720,19 @@ impossible position"; else if (event_type == STOP_EVENT) binlog_can_be_corrupted= FALSE; + /* + Introduced this code to make the gcc 4.6.1 compiler happy. When + warnings are converted to errors, the compiler complains about + the fact that binlog_can_be_corrupted is defined but never used. + + We need to check if this is a dead code or if someone removed any + code by mistake. + + /Alfranio + */ + if (binlog_can_be_corrupted) + sql_print_information("The binlog may be corrupted."); + pos = my_b_tell(&log); if (RUN_HOOK(binlog_transmit, before_send_event, (thd, flags, packet, log_file_name, pos)))