diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 13:22:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 13:22:53 +0000 |
commit | 347c164c35eddab388009470e6848cb361ac93f8 (patch) | |
tree | 2c0c44eac690f510bb0a35b2a13b36d606b77b6b /sql/semisync_slave.cc | |
parent | Releasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff) | |
download | mariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip |
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | sql/semisync_slave.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/semisync_slave.cc b/sql/semisync_slave.cc index 4314b116..d10754ad 100644 --- a/sql/semisync_slave.cc +++ b/sql/semisync_slave.cc @@ -17,6 +17,7 @@ #include <my_global.h> #include "semisync_slave.h" +#include "debug_sync.h" Repl_semi_sync_slave repl_semisync_slave; @@ -33,7 +34,6 @@ int Repl_semi_sync_slave::init_object() m_init_done = true; /* References to the parameter works after set_options(). */ - set_slave_enabled(global_rpl_semi_sync_slave_enabled); set_trace_level(rpl_semi_sync_slave_trace_level); set_delay_master(rpl_semi_sync_slave_delay_master); set_kill_conn_timeout(rpl_semi_sync_slave_kill_conn_timeout); @@ -128,7 +128,21 @@ void Repl_semi_sync_slave::slave_start(Master_info *mi) void Repl_semi_sync_slave::slave_stop(Master_info *mi) { if (get_slave_enabled()) + { +#ifdef ENABLED_DEBUG_SYNC + /* + TODO: Remove after MDEV-28141 + */ + DBUG_EXECUTE_IF("delay_semisync_kill_connection_for_mdev_28141", { + const char act[]= "now " + "signal at_semisync_kill_connection " + "wait_for continue_semisync_kill_connection"; + DBUG_ASSERT(debug_sync_service); + DBUG_ASSERT(!debug_sync_set_action(mi->io_thd, STRING_WITH_LEN(act))); + };); +#endif kill_connection(mi->mysql); + } set_slave_enabled(0); } @@ -167,8 +181,6 @@ void Repl_semi_sync_slave::kill_connection(MYSQL *mysql) goto failed_graceful_kill; } - DBUG_EXECUTE_IF("slave_delay_killing_semisync_connection", my_sleep(400000);); - kill_buffer_length= my_snprintf(kill_buffer, 30, "KILL %lu", mysql->thread_id); if (mysql_real_query(kill_mysql, kill_buffer, (ulong)kill_buffer_length)) |