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

FLUSH STATUS is reseting Subquery_cache_miss and Subquery_cache_hits global status variables

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Not a Bug
    • Affects Version/s: 5.5.31
    • Fix Version/s: 5.5.32
    • Component/s: None
    • Labels:
    • Environment:
      Debian Squeeze amd64

      Description

      Normally, only the SESSION status variables are flushed/reset when FLUSH STATUS is called but the Subquery_cache_hit and Subquery_cache_miss variables are globally reset (knowing that these status variables have the same value for the GLOBAL and SESSION scope).

      MariaDB \[(none)]> SHOW GLOBAL STATUS LIKE 'Subquery_cache%'; FLUSH STATUS; SHOW GLOBAL STATUS LIKE 'Subquery_cache%';
      +---------------------+-----------+
      | Variable_name       | Value     |
      +---------------------+-----------+
      | Subquery_cache_hit  | 732043764 |
      | Subquery_cache_miss | 46946161  |
      +---------------------+-----------+
      2 rows in set (0.00 sec)
      
      Query OK, 0 rows affected (0.00 sec)
      
      +---------------------+-------+
      | Variable_name       | Value |
      +---------------------+-------+
      | Subquery_cache_hit  | 0     |
      | Subquery_cache_miss | 0     |
      +---------------------+-------+
      2 rows in set (0.00 sec)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Not judging whether it's a bug or not (I'll leave it to somebody else to decide it), just for a note – description of FLUSH STATUS says it may reset global variables:

            <quote>
            This option adds the current thread's session status variable values to the global values and resets the session values to zero. Some global variables may be reset to zero as well. It also resets the counters for key caches (default and named) to zero and sets Max_used_connections to the current number of open connections.
            </quote>
            http://dev.mysql.com/doc/refman/5.5/en/flush.html

            Show
            elenst Elena Stepanova added a comment - Not judging whether it's a bug or not (I'll leave it to somebody else to decide it), just for a note – description of FLUSH STATUS says it may reset global variables: <quote> This option adds the current thread's session status variable values to the global values and resets the session values to zero. Some global variables may be reset to zero as well. It also resets the counters for key caches (default and named) to zero and sets Max_used_connections to the current number of open connections. </quote> http://dev.mysql.com/doc/refman/5.5/en/flush.html
            Hide
            jb-boin Jean Weisbuch added a comment -

            You are right, its not a bug then as the global and session status are shared on this variable.

            Show
            jb-boin Jean Weisbuch added a comment - You are right, its not a bug then as the global and session status are shared on this variable.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                jb-boin Jean Weisbuch
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: