summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-10-21 14:57:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-10-21 14:57:00 +0300
commit489ef007bec398c3b7b628325b225c3a015922cf (patch)
tree7d1d5b1ea2c55d608f8697377776b9777fa622be /sql/sql_repl.cc
parentd10c42b42541deed899dd1d1e04b69475339196c (diff)
parentd5bcccdabbf1a23c75ab4ee0c14149eb6ed27d98 (diff)
downloadmariadb-git-489ef007bec398c3b7b628325b225c3a015922cf.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index e96129465fe..94cbc6be614 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -3948,6 +3948,16 @@ err:
mi->unlock_slave_threads();
if (ret == FALSE)
my_ok(thd);
+ else
+ {
+ /*
+ Depending on where CHANGE MASTER failed, the logs may be waiting to be
+ reopened. This would break future log updates and CHANGE MASTER calls.
+ `try_fix_log_state()` allows the relay log to fix its state to no longer
+ expect to be reopened.
+ */
+ mi->rli.relay_log.try_fix_log_state();
+ }
DBUG_RETURN(ret);
}