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

Incorrect description of USER_STATISTICS.EPTY_QUERIES

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      It is about https://mariadb.com/kb/en/user-statistics/

      Internally CLIENT_STATISTICS and USER_STATISTICS data format are the same (i.e they collect the same information about different objects) so description of the fields should be the same.

      CLIENT_STATISTICS.EPTY_QUERIES description is correct.

      USER_STATISTICS.EPTY_QUERIES gives description of Com_empty_query as I can see.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            sanja Oleksandr Byelkin added a comment - - edited

            It might be that I am wrong (CLIENT_STATISTICS description is RIGHT and USER_STATISTICS is wrong)

            there is EMPTY_QUERY and empty_queries, and they are different.

            Show
            sanja Oleksandr Byelkin added a comment - - edited It might be that I am wrong (CLIENT_STATISTICS description is RIGHT and USER_STATISTICS is wrong) there is EMPTY_QUERY and empty_queries, and they are different.
            Hide
            sanja Oleksandr Byelkin added a comment -

            It appeared to be vice verse. Sorry.

            Show
            sanja Oleksandr Byelkin added a comment - It appeared to be vice verse. Sorry.
            Hide
            elenst Elena Stepanova added a comment -

            Apparently (empirically), EMPTY_QUERIES means "queries that returned no results to the server", even though Percona documentation http://www.percona.com/doc/percona-server/5.5/diagnostics/user_stats.html puts it differently. The results below are true both for Percona 5.5 and MariaDB 10.0.

            I've updated the page accordingly.

            MariaDB [test]> flush user_statistics, client_statistics;
            
            MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost';
            +------------+--------------+
            | user_empty | client_empty |
            +------------+--------------+
            |          0 |            0 |
            +------------+--------------+
            
            MariaDB [test]> select * from mysql.proc;
            Empty set (0.00 sec)
            
            MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost';
            +------------+--------------+
            | user_empty | client_empty |
            +------------+--------------+
            |          1 |            1 |
            +------------+--------------+
            
            MariaDB [test]> ;
            ERROR: No query specified
            
            MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost';
            +------------+--------------+
            | user_empty | client_empty |
            +------------+--------------+
            |          1 |            1 |
            +------------+--------------+
            
            MariaDB [test]> select * from mysql.proc;
            Empty set (0.00 sec)
            
            MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost';
            +------------+--------------+
            | user_empty | client_empty |
            +------------+--------------+
            |          2 |            2 |
            +------------+--------------+
            
            Show
            elenst Elena Stepanova added a comment - Apparently (empirically), EMPTY_QUERIES means "queries that returned no results to the server", even though Percona documentation http://www.percona.com/doc/percona-server/5.5/diagnostics/user_stats.html puts it differently. The results below are true both for Percona 5.5 and MariaDB 10.0. I've updated the page accordingly. MariaDB [test]> flush user_statistics, client_statistics; MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost'; +------------+--------------+ | user_empty | client_empty | +------------+--------------+ | 0 | 0 | +------------+--------------+ MariaDB [test]> select * from mysql.proc; Empty set (0.00 sec) MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost'; +------------+--------------+ | user_empty | client_empty | +------------+--------------+ | 1 | 1 | +------------+--------------+ MariaDB [test]> ; ERROR: No query specified MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost'; +------------+--------------+ | user_empty | client_empty | +------------+--------------+ | 1 | 1 | +------------+--------------+ MariaDB [test]> select * from mysql.proc; Empty set (0.00 sec) MariaDB [test]> select a.empty_queries as user_empty, b.empty_queries as client_empty from information_schema.user_statistics a, information_schema.client_statistics b where a.user = 'root' and b.client= 'localhost'; +------------+--------------+ | user_empty | client_empty | +------------+--------------+ | 2 | 2 | +------------+--------------+

              People

              • Assignee:
                Unassigned
                Reporter:
                sanja Oleksandr Byelkin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: