Details
-
New Feature
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Current FLUSH STATUS command has a bunch of issues:
- it resets many session variables and some global variables — but not all session and not all global, the decision was made per variable and was rather ad hoc
- it requires RELOAD global privilege, a user cannot reset status in his session other than by reconnecting
A more useful behavior could be:
- there are clear criteria what variables are reset and what aren't
- FLUSH [ SESSION | LOCAL ] STATUS flushes appropriate session variables, and requires no privileges at all
- FLUSH GLOBAL STATUS requires RELOAD and resets appropriate global variables
original description:
Currently there is now way to flush global status variables, stored in 'global_status_var', which is useful for testing.
Another issue is that FLUSH STATUS resets some global variables (all LONG and LONGLONG C global variables) which 'normal' users should not be allowed to do. This is not dangerous but can be confusing for shared instances.
The proposal is to implement FLUSH SESSION STATUS, which only resets thread local variables and FLUSH GLOBAL STATUS that resets global_status_vars and the currently reset global C variables.
FLUSH STATUS will be mapped to FLUSH SESSION STATUS and can be used without any privileges.
FLUSH GLOBAL STATUS will require the RELOAD_ACL, like now.
The first version, in 11.5 will not reset all global variables with FLUSH GLOBAL STATUS, just the variables that are reset for now.
In 11.6 we will extend it to reset all global summary variables, so please take this into account when using FLUSH GLOBAL VARIABLES.
Attachments
Issue Links
- causes
-
MDEV-33965 Additions to main.status are non-deterministic and inefficient (and fail in buildbot)
- Confirmed
-
MDEV-33992 mariadb-admin flush-status command should do FLUSH GLOBAL STATUS
- Closed
- relates to
-
MDEV-34271 main.status fails sporadically with a diff
- Closed