-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.0
-
Component/s: Information Schema
-
Labels:None
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.
- relates to
-
MDEV-15135 'show global status' can cause lock contention on LOCK_thread_count
-
- Closed
-