1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17251 SHOW STATUS unnecessary calls calc_sum_of_all_status

1. only call calc_sum_of_all_status() if a global
   SHOW_xxx_STATUS variable is to be returned
2. only lock LOCK_status when copying global_status_var,
   but not when iterating all threads
This commit is contained in:
Sergei Golubchik
2021-01-07 19:37:47 +01:00
parent 4c448836d4
commit 63f9192787
4 changed files with 16 additions and 11 deletions

View File

@ -564,6 +564,7 @@ void mysql_print_status()
STATUS_VAR tmp;
uint count;
tmp= global_status_var;
count= calc_sum_of_all_status(&tmp);
printf("\nStatus information:\n\n");
(void) my_getwd(current_dir, sizeof(current_dir),MYF(0));