diff options
-rw-r--r-- | sql/log.cc | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 8 | ||||
-rw-r--r-- | sql/sql_test.cc | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/sql/log.cc b/sql/log.cc index 90d3623e643..4b18c14ff79 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -9640,7 +9640,7 @@ set_binlog_snapshot_file(const char *src) Copy out current values of status variables, for SHOW STATUS or information_schema.global_status. - This is called only under LOCK_status, so we can fill in a static array. + This is called only under LOCK_show_status, so we can fill in a static array. */ void TC_LOG_BINLOG::set_status_variables(THD *thd) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 87cec1ce2ae..d78f20d95fa 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -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 { diff --git a/sql/sql_test.cc b/sql/sql_test.cc index c54a7f302e9..60e9b2cc54c 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -575,7 +575,6 @@ void mysql_print_status() /* Print key cache status */ puts("\nKey caches:"); process_key_caches(print_key_cache_status, 0); - mysql_mutex_lock(&LOCK_status); printf("\nhandler status:\n\ read_key: %10lu\n\ read_next: %10lu\n\ @@ -591,7 +590,6 @@ update: %10lu\n", tmp.ha_write_count, tmp.ha_delete_count, tmp.ha_update_count); - mysql_mutex_unlock(&LOCK_status); printf("\nTable status:\n\ Opened tables: %10lu\n\ Open tables: %10lu\n\ |