summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-02-16 10:25:34 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2023-02-16 10:25:34 +0200
commit0d55914d968fcc557d4429a37c61fbdedd9352a6 (patch)
treec119f75d1aac283025ff379b07cab78b6d8b384d /sql/slave.cc
parent37a46e21815fe1176d211a89283d9bc17fcd39db (diff)
parentb12cd88ce177b475066734b06c1e3a4445a62d86 (diff)
downloadmariadb-git-0d55914d968fcc557d4429a37c61fbdedd9352a6.tar.gz
Merge 10.8 into 10.9
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 3ab311c4d71..403b33d13cf 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4262,6 +4262,21 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
int exec_res;
Log_event_type typ= ev->get_type_code();
+ DBUG_EXECUTE_IF(
+ "pause_sql_thread_on_next_event",
+ {
+ /*
+ Temporarily unlock data_lock so we can check-in with the IO thread
+ */
+ mysql_mutex_unlock(&rli->data_lock);
+ DBUG_ASSERT(!debug_sync_set_action(
+ thd,
+ STRING_WITH_LEN(
+ "now SIGNAL paused_on_event WAIT_FOR sql_thread_continue")));
+ DBUG_SET("-d,pause_sql_thread_on_next_event");
+ mysql_mutex_lock(&rli->data_lock);
+ });
+
/*
Even if we don't execute this event, we keep the master timestamp,
so that seconds behind master shows correct delta (there are events