Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33145

Add FLUSH GLOBAL STATUS

    XMLWordPrintable

Details

    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

          Activity

            People

              monty Michael Widenius
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.