summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2010-11-30 23:32:51 +0000
committerLuis Soares <luis.soares@oracle.com>2010-11-30 23:32:51 +0000
commitaaefb52df8e8bcf67faaa5b1cf4b2de6c83f408a (patch)
tree702184f10f3525d7e537b20ac0b84e2e45a0279c /sql/slave.h
parent2419cec9f1ca35053feca7311a2f8d94f4198606 (diff)
downloadmariadb-git-aaefb52df8e8bcf67faaa5b1cf4b2de6c83f408a.tar.gz
BUG#46166: MYSQL_BIN_LOG::new_file_impl is not propagating error
when generating new name. If find_uniq_filename returns an error, then this error is not being propagated upwards, and execution does not report error to the user (although a entry in the error log is generated). Additionally, some more errors were ignored in new_file_impl: - when writing the rotate event - when reopening the index and binary log file This patch addresses this by propagating the error up in the execution stack. Furthermore, when rotation of the binary log fails, an incident event is written, because there may be a chance that some changes for a given statement, were not properly logged. For example, in SBR, LOAD DATA INFILE statement requires more than one event to be logged, should rotation fail while logging part of the LOAD DATA events, then the logged data would become inconsistent with the data in the storage engine.
Diffstat (limited to 'sql/slave.h')
-rw-r--r--sql/slave.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/slave.h b/sql/slave.h
index f356d28b626..da14b3ab4b0 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -189,7 +189,7 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
const char** errmsg);
void set_slave_thread_options(THD* thd);
void set_slave_thread_default_charset(THD *thd, Relay_log_info const *rli);
-void rotate_relay_log(Master_info* mi);
+int rotate_relay_log(Master_info* mi);
int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli);
pthread_handler_t handle_slave_io(void *arg);