[MDEV-5083] Incorrect description of USER_STATISTICS.EPTY_QUERIES Created: 2013-10-01  Updated: 2014-04-09  Resolved: 2014-04-09

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Oleksandr Byelkin Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: documentation


 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.



 Comments   
Comment by Oleksandr Byelkin [ 2013-10-01 ]

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.

Comment by Oleksandr Byelkin [ 2013-10-01 ]

It appeared to be vice verse. Sorry.

Comment by Elena Stepanova [ 2014-04-09 ]

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 |
+------------+--------------+

Generated at Thu Feb 08 07:01:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.