summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-23 16:41:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-23 16:41:34 +0300
commit8c80a66e047ba149bff03f42a1adcb2c9315135d (patch)
tree1e058ed6ffdf07d7846d8f74c4e640da21fbbc4f /sql/sql_repl.cc
parent61c0df94655f2dc3146456e49f3f51610251e79f (diff)
downloadmariadb-git-bb-10.3-marko.tar.gz
MDEV-22351 RESET MASTER should be propagated to InnoDBbb-10.3-marko
Ever since commit 947efe17ed8188ca4feef6deb0c2831a246b5c8f InnoDB no longer writes binlog position in one place. It will not at all be written to the TRX_SYS page, and instead it will be written to the undo log header page that changes the transaction state. ha_reset_master(), trx_rseg_reset_binlog_pos(): Reset the binlog information in InnoDB when RESET MASTER is invoked. reset_master(): Invoke ha_reset_master() to discard the information in InnoDB.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index aa81d33f2e7..159c1946839 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2008, 2019, MariaDB Corporation
+ Copyright (c) 2008, 2020, MariaDB Corporation
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3879,6 +3879,7 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len,
repl_semisync_master.before_reset_master();
ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len,
next_log_number);
+ ha_reset_master();
repl_semisync_master.after_reset_master();
return ret;
}