diff options
author | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-01-24 10:35:07 +0530 |
---|---|---|
committer | Venkatesh Duggirala <venkatesh.duggirala@oracle.com> | 2013-01-24 10:35:07 +0530 |
commit | f31611c4c585d916697131446d2ad2928d4ad36f (patch) | |
tree | 14e64b215d48d65a7f349e0f185522e0c577a387 /sql/sql_repl.cc | |
parent | 7ebefeec6ffcd0ea65e8ba00f6eda0df83ab7a1b (diff) | |
download | mariadb-git-f31611c4c585d916697131446d2ad2928d4ad36f.tar.gz |
BUG#14798572: REMOVE UNUSED VARIABLE BINLOG_CAN_BE_CORRUPTED
FROM MYSQL_BINLOG_SEND
As part Bug #11747416 A DISK FULL MAKES BINARY LOG CORRUPT,
reading the variable "binlog_can_be_corrupted" was removed
In the existing code the value of this variable is only set,
never read. And also this issue causing compiler warnings.
So the variable is completely redundant and should be removed.
sql/sql_repl.cc:
Removing dead code
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index e16ce15e512..15d0d5c90d5 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -452,7 +452,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, mysql_mutex_t *log_lock; mysql_cond_t *log_cond; - bool binlog_can_be_corrupted= FALSE; #ifndef DBUG_OFF int left_events = max_binlog_dump_events; #endif @@ -621,8 +620,6 @@ impossible position"; (*packet)[EVENT_TYPE_OFFSET+ev_offset])); if ((*packet)[EVENT_TYPE_OFFSET+ev_offset] == FORMAT_DESCRIPTION_EVENT) { - binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+ev_offset] & - LOG_EVENT_BINLOG_IN_USE_F); (*packet)[FLAGS_OFFSET+ev_offset] &= ~LOG_EVENT_BINLOG_IN_USE_F; /* mark that this event with "log_pos=0", so the slave @@ -711,34 +708,8 @@ impossible position"; }); if (event_type == FORMAT_DESCRIPTION_EVENT) { - binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+ev_offset] & - LOG_EVENT_BINLOG_IN_USE_F); (*packet)[FLAGS_OFFSET+ev_offset] &= ~LOG_EVENT_BINLOG_IN_USE_F; } - 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) - { - /* - Don't try to print out warning messages because this generates - erroneous messages in the error log and causes performance - problems. - - /Alfranio - */ - } - pos = my_b_tell(&log); if (RUN_HOOK(binlog_transmit, before_send_event, (thd, flags, packet, log_file_name, pos))) |