mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Use LOCK_show_status when we add things to all_status_vars
This was missing in my last commit for fixing possible lockups in SHOW STATUS. sql/log.cc: Fixed comment sql/sql_show.cc: Use LOCK_show_status when we add things to all_status_vars sql/sql_test.cc: Remove not needed mutex_lock
This commit is contained in:
@ -2846,7 +2846,7 @@ int add_status_vars(SHOW_VAR *list)
|
||||
{
|
||||
int res= 0;
|
||||
if (status_vars_inited)
|
||||
mysql_mutex_lock(&LOCK_status);
|
||||
mysql_mutex_lock(&LOCK_show_status);
|
||||
if (!all_status_vars.buffer && // array is not allocated yet - do it now
|
||||
my_init_dynamic_array(&all_status_vars, sizeof(SHOW_VAR), 200, 20, MYF(0)))
|
||||
{
|
||||
@ -2861,7 +2861,7 @@ int add_status_vars(SHOW_VAR *list)
|
||||
sort_dynamic(&all_status_vars, show_var_cmp);
|
||||
err:
|
||||
if (status_vars_inited)
|
||||
mysql_mutex_unlock(&LOCK_status);
|
||||
mysql_mutex_unlock(&LOCK_show_status);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -2923,7 +2923,7 @@ void remove_status_vars(SHOW_VAR *list)
|
||||
{
|
||||
if (status_vars_inited)
|
||||
{
|
||||
mysql_mutex_lock(&LOCK_status);
|
||||
mysql_mutex_lock(&LOCK_show_status);
|
||||
SHOW_VAR *all= dynamic_element(&all_status_vars, 0, SHOW_VAR *);
|
||||
|
||||
for (; list->name; list++)
|
||||
@ -2944,7 +2944,7 @@ void remove_status_vars(SHOW_VAR *list)
|
||||
}
|
||||
}
|
||||
shrink_var_array(&all_status_vars);
|
||||
mysql_mutex_unlock(&LOCK_status);
|
||||
mysql_mutex_unlock(&LOCK_show_status);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user