diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-03-19 13:06:31 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-03-19 13:09:21 +0200 |
commit | be881ec4572b1cecd497436c5db471a83b6ae728 (patch) | |
tree | 966fef6744a55d6b0decd0ccee14d89774734c07 /sql/sql_show.cc | |
parent | 190a8312f598fc4892331225104297f6288f23ac (diff) | |
parent | 550cf13eb3e8a25826a0fa67935fc28ee7adb0c8 (diff) | |
download | mariadb-git-be881ec4572b1cecd497436c5db471a83b6ae728.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 72662ef25e7..db7750eedbe 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3772,15 +3772,8 @@ static bool show_status_array(THD *thd, const char *wild, if (show_type == SHOW_SYS) mysql_mutex_lock(&LOCK_global_system_variables); - else if (show_type >= SHOW_LONG_STATUS && scope == OPT_GLOBAL && - !status_var->local_memory_used) - { - mysql_mutex_lock(&LOCK_status); - *status_var= global_status_var; - mysql_mutex_unlock(&LOCK_status); - calc_sum_of_all_status(status_var); - DBUG_ASSERT(status_var->local_memory_used); - } + else if (show_type >= SHOW_LONG_STATUS && scope == OPT_GLOBAL) + calc_sum_of_all_status_if_needed(status_var); pos= get_one_variable(thd, var, scope, show_type, status_var, &charset, buff, &length); |