Commit 8761571a authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-22524 SIGABRT in safe_mutex_unlock with

session_track_system_variables and max_relay_log_size.

lock LOCK_global_system_variables around the get_one_variable() call
in the Session_sysvars_tracker::store_variable().
parent bc540b87
......@@ -159,6 +159,8 @@ SELECT @@session.session_track_system_variables;
@@session.session_track_system_variables
# MDEV-22524 SIGABRT in safe_mutex_unlock with session_track_system_variables and max_relay_log_size.
SET SESSION session_track_system_variables="sql_slave_skip_counter", sql_slave_skip_counter= 0;
# Restoring the original values.
SET @@global.session_track_system_variables = @global_saved_tmp;
# End of tests.
......@@ -122,6 +122,8 @@ SELECT @@global.session_track_system_variables;
SELECT @@session.session_track_system_variables;
--echo
--echo # MDEV-22524 SIGABRT in safe_mutex_unlock with session_track_system_variables and max_relay_log_size.
SET SESSION session_track_system_variables="sql_slave_skip_counter", sql_slave_skip_counter= 0;
--echo # Restoring the original values.
SET @@global.session_track_system_variables = @global_saved_tmp;
......
......@@ -772,8 +772,11 @@ my_bool Session_sysvars_tracker::store_variable(void *ptr, void *data_ptr)
show.name= svar->name.str;
show.value= (char *) svar;
mysql_mutex_lock(&LOCK_global_system_variables);
const char *value= get_one_variable(thd, &show, OPT_SESSION, SHOW_SYS, NULL,
&charset, val_buf, &val_length);
mysql_mutex_unlock(&LOCK_global_system_variables);
if (is_plugin)
mysql_mutex_unlock(&LOCK_plugin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment