Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
-
None
Description
SHOW GLOBAL STATUS and INFORMATION_SCHEMA.GLOBAL_STATUS always invoke calc_sum_of_all_status() to aggregate values of global status variables from session status variables into a temporary buffer.
This is done even when no such aggregated variable will be returned to the user (e.g. because of LIKE 'uptime'. And calc_sum_of_all_status() can be rather expensive with many threads, see MDEV-15135, so it's a waste to call it and not use the result.
The fix could be to call calc_sum_of_all_status() from show_status_array() when it stumbles upon a first variable that needs aggregation.
Attachments
Issue Links
- relates to
-
MDEV-15135 'show global status' can cause lock contention on LOCK_thread_count
- Closed