summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorBrandon Nesterenko <brandon.nesterenko@mariadb.com>2022-04-13 12:45:50 -0600
committerBrandon Nesterenko <brandon.nesterenko@mariadb.com>2022-04-25 08:07:17 -0600
commitd16c3aca3c3ecd1050b2527c213f4fdf1959d9e2 (patch)
treebd938f055fcb3fbff55362d9fbec4df71076c12c /sql/mysqld.cc
parenta83c7ab1ea62954ab81cd599315e76a2f115ff92 (diff)
downloadmariadb-git-d16c3aca3c3ecd1050b2527c213f4fdf1959d9e2.tar.gz
MDEV-26473: mysqld got exception 0xc0000005 (rpl_slave_state/rpl_load_gtid_slave_state)
Problem: ======== During mysqld initialization, if the number of GTIDs added since that last purge of the mysql.gtid_slave_pos tables is greater than or equal to the –-gtid-cleanup-batch-size value, a race condition can occur. Specifically, the binlog background thread will submit the bg_gtid_delete_pending job to the mysql handle manager; however, the mysql handle manager may not be initialized, leading to crashes. Solution: ======== Force the mysql handle manager to initialize/start before the binlog background thread is created. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 754f0821cd8..fb3bee9db1a 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -5405,6 +5405,7 @@ static int init_server_components()
unireg_abort(1);
}
+ start_handle_manager();
if (opt_bin_log)
{
int error;
@@ -5864,7 +5865,6 @@ int mysqld_main(int argc, char **argv)
}
create_shutdown_event();
- start_handle_manager();
/* Copy default global rpl_filter to global_rpl_filter */
copy_filter_setting(global_rpl_filter, get_or_create_rpl_filter("", 0));