diff options
author | Monty <monty@mariadb.org> | 2015-07-15 16:27:14 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-07-16 10:36:58 +0300 |
commit | 872a953b228e93553ed056d8fa035ff06e884bc8 (patch) | |
tree | a90958d21c610b2517705ab79666aacd8c837e84 /sql/rpl_rli.cc | |
parent | df0498fd76897c0e034ab3f0598972f0e2419b02 (diff) | |
download | mariadb-git-872a953b228e93553ed056d8fa035ff06e884bc8.tar.gz |
MDEV-8469 Add RESET MASTER TO x to allow specification of binlog file nr
Other things:
- Avoid calling init_and_set_log_file_name() when opening binary log.
- Remove newlines early when reading from index file.
- Ensure that reset_logs() will work even if thd is 0 (Can happen on startup)
- Added thd to sart_slave_threads() for better error handling.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index e70a436585c..aba568ee317 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -228,7 +228,7 @@ a file name for --relay-log-index option", opt_relaylog_index_name); but a destructor will take care of that */ if (rli->relay_log.open_index_file(buf_relaylog_index_name, ln, TRUE) || - rli->relay_log.open(ln, LOG_BIN, 0, SEQ_READ_APPEND, + rli->relay_log.open(ln, LOG_BIN, 0, 0, SEQ_READ_APPEND, mi->rli.max_relay_log_size, 1, TRUE)) { mysql_mutex_unlock(&rli->data_lock); @@ -1076,6 +1076,9 @@ void Relay_log_info::close_temporary_tables() /* purge_relay_logs() + @param rli Relay log information + @param thd thread id. May be zero during startup + NOTES Assumes to have a run lock on rli and that no slave thread are running. */ @@ -1131,7 +1134,7 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset, rli->cur_log_fd= -1; } - if (rli->relay_log.reset_logs(thd, !just_reset, NULL, 0)) + if (rli->relay_log.reset_logs(thd, !just_reset, NULL, 0, 0)) { *errmsg = "Failed during log reset"; error=1; |