diff options
| author | Sergei Golubchik <serg@mariadb.org> | 2021-01-07 19:37:47 +0100 |
|---|---|---|
| committer | Sergei Golubchik <serg@mariadb.org> | 2021-01-11 21:54:47 +0100 |
| commit | 63f91927870b41b8965e2a2a868abcc2b3672f68 (patch) | |
| tree | c1f7e0f76168834f2aa0ee461a9ce1e07bed0408 /sql/sql_test.cc | |
| parent | 4c448836d489bd5a25c7509e8a69309c3b0a8e72 (diff) | |
| download | mariadb-git-63f91927870b41b8965e2a2a868abcc2b3672f68.tar.gz | |
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
Diffstat (limited to 'sql/sql_test.cc')
| -rw-r--r-- | sql/sql_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 4e68ec2ec2e..c0e62227665 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -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)); |
