From 63f91927870b41b8965e2a2a868abcc2b3672f68 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 7 Jan 2021 19:37:47 +0100 Subject: 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 --- sql/sql_plugin.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql/sql_plugin.h') diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 64194b5a1b5..13f7296e0cd 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -22,9 +22,10 @@ that is defined in plugin.h */ #define SHOW_always_last SHOW_KEY_CACHE_LONG, \ - SHOW_LONG_STATUS, SHOW_DOUBLE_STATUS, \ SHOW_HAVE, SHOW_MY_BOOL, SHOW_HA_ROWS, SHOW_SYS, \ - SHOW_LONG_NOFLUSH, SHOW_LONGLONG_STATUS, SHOW_LEX_STRING + SHOW_LONG_NOFLUSH, SHOW_LEX_STRING, \ + /* SHOW_*_STATUS must be at the end, SHOW_LONG_STATUS being first */ \ + SHOW_LONG_STATUS, SHOW_DOUBLE_STATUS, SHOW_LONGLONG_STATUS #include #undef SHOW_always_last -- cgit v1.2.1