diff options
author | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-06-05 13:10:24 +0530 |
---|---|---|
committer | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-06-05 13:11:10 +0530 |
commit | da61107fc8481b03ae858188dd03b3114e7aa084 (patch) | |
tree | 5964b2c334614bfdf12cfd24a5d627bb1c451aa9 /sql/sql_reload.cc | |
parent | 112b21da37dad0fbb28bc65f9ab5a3ba6c0c2186 (diff) | |
download | mariadb-git-da61107fc8481b03ae858188dd03b3114e7aa084.tar.gz |
MDEV-9544 FLUSH [RELAY] LOGS does not rotate logs for a named slave
Problem:- In the case of multisource replication/named slave
when we run "FLUSH LOGS" , it does not flush logs.
Solution:- A new function Master_info_index->flush_all_relay_logs()
is created which will rotate relay logs for all named slave.
This will be called in reload_acl_and_cache function when
connection_name.length == 0
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 995c4c0a838..376dfeb1542 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -181,8 +181,12 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, slave is not likely to have the same connection names. */ tmp_write_to_binlog= 0; - - if (!(mi= (get_master_info(&connection_name, + if (connection_name.length == 0) + { + if (master_info_index->flush_all_relay_logs()) + *write_to_binlog= -1; + } + else if (!(mi= (get_master_info(&connection_name, Sql_condition::WARN_LEVEL_ERROR)))) { result= 1; |