diff options
author | Monty <monty@mariadb.org> | 2017-02-05 02:23:49 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-02-28 16:10:47 +0100 |
commit | 4bad74e13955ee21015c6b8a9d4bd07624924efa (patch) | |
tree | 4cdc19790506479ced8062496f7cdb750a912303 /sql/slave.cc | |
parent | a2de378c00c17b358fa784dcca6ab4ac11b56821 (diff) | |
download | mariadb-git-4bad74e13955ee21015c6b8a9d4bd07624924efa.tar.gz |
Added error checking for all calls to flush_relay_log_info() and stmt_done()
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 1bb2b534693..1634a56a4b6 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4788,8 +4788,15 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME, if (rli->mi->using_gtid != Master_info::USE_GTID_NO) { ulong domain_count; + my_bool save_log_all_errors= thd->log_all_errors; + /* + We don't need to check return value for flush_relay_log_info() + as any errors should be logged to stderr + */ + thd->log_all_errors= 1; flush_relay_log_info(rli); + thd->log_all_errors= save_log_all_errors; if (mi->using_parallel()) { /* @@ -6715,9 +6722,12 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size) } rli->event_relay_log_pos = BIN_LOG_HEADER_SIZE; strmake_buf(rli->event_relay_log_name,rli->linfo.log_file_name); - flush_relay_log_info(rli); + if (flush_relay_log_info(rli)) + { + errmsg= "error flushing relay log"; + goto err; + } } - /* Now we want to open this next log. To know if it's a hot log (the one being written by the I/O thread now) or a cold log, we can use |