summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei <andrei.elkin@mariadb.com>2021-12-21 23:31:34 +0200
committerAndrei <andrei.elkin@mariadb.com>2021-12-21 23:31:34 +0200
commit8fc5d21de2530bf7ca9edd0577f8566eda5d512c (patch)
treefc8ecff5b37448ac79fce8a5f4f791bc98c950c5
parent257b75b07191548c43d3590c644e112bf497aa76 (diff)
downloadmariadb-git-8fc5d21de2530bf7ca9edd0577f8566eda5d512c.tar.gz
Corrected "OPTIMIZE" commit and refined an MDL assert
Binlogging temporary switch-off gets now checked instead of a permanent switch-off, 'cos the latter leads to an assert in slave skip binlogging setups. MDL assert was not fully ready to accept possibility of concurrent erroring out MDL and later gtid ordered SA. That got fixed.
-rw-r--r--sql/log.cc2
-rw-r--r--sql/mdl.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 4508b4808fb..d2c456f5257 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -600,7 +600,7 @@ bool write_bin_log_start_alter(THD *thd, bool& partial_alter,
uint64 start_alter_id, bool if_exists)
{
#if defined(HAVE_REPLICATION)
- if (!(thd->variables.option_bits & OPTION_BIN_LOG))
+ if (thd->variables.option_bits & OPTION_BIN_TMP_LOG_OFF)
return false;
if (start_alter_id)
diff --git a/sql/mdl.cc b/sql/mdl.cc
index babe002e760..bb764d04a42 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -2241,7 +2241,8 @@ bool MDL_lock::check_if_conflicting_replication_locks(MDL_context *ctx)
conflicting_rgi_slave->rli == rgi_slave->rli &&
conflicting_rgi_slave->current_gtid.domain_id ==
rgi_slave->current_gtid.domain_id &&
- !(conflicting_rgi_slave->did_mark_start_commit ||
+ !((conflicting_rgi_slave->did_mark_start_commit ||
+ conflicting_rgi_slave->worker_error) ||
conflicting_rgi_slave->finish_event_group_called))
return 1; // Fatal error
}