summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
authorSachin Setiya <sachin.setiya@mariadb.com>2017-06-05 12:24:53 +0530
committerSachin Setiya <sachin.setiya@mariadb.com>2017-06-05 12:25:24 +0530
commit2a847875e0084c7e5322646e298f9842e40c3613 (patch)
tree84090965e8e7bcbee5abf68ff83501f395269c96 /sql/sql_reload.cc
parente4d10e09cf318aad237143254c45458d16009f70 (diff)
downloadmariadb-git-bb-mdev-9544.tar.gz
MDEV-9544 FLUSH [RELAY] LOGS does not rotate logs for a named slavebb-mdev-9544
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.cc8
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;