summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 62ddc8aaf21..ca72aaea69a 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2432,8 +2432,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
exec_res= 0;
trans_rollback(thd);
close_thread_tables(thd);
- if (!thd->locked_tables_mode)
- thd->mdl_context.release_all_locks();
+ thd->mdl_context.release_transactional_locks();
/* chance for concurrent connection to get more locks */
safe_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE),
(CHECK_KILLED_FUNC)sql_slave_killed, (void*)rli);