Bug #19422 undocumented 'show global status' has replaced 'show status'
Submitted: 28 Apr 2006 10:15 Modified: 28 Apr 2006 12:27
Reporter: Heikki Hannikainen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0, 5.1 OS:
Assigned to: CPU Architecture:Any

[28 Apr 2006 10:15] Heikki Hannikainen
Description:
It seems that in 5.0+ the com_* variables 'show status' are counted per session, not globally over the whole server. Starting from 5.0 you need to issue the command 'show global status' to get the server-wide counters. This breaks old server statistics scripts (which will need to figure out the server version before issuing the new command, since 'show global status' is not supported before 5.0). The change causes confusion: http://bugs.mysql.com/bug.php?id=16124

The new 'show global status' command is not documented
(http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html or http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html) or
mentioned in the upgrade instructions
(http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html).

How to repeat:
$ mysql -u root db-e "select * from interface limit 1"
...
$ mysql -u root db -e "show status like 'com_select'"
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_select    | 0     |
+---------------+-------+
$ mysql -u root db -e "show global status like 'com_select'"
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Com_select    | 357250 |
+---------------+--------+

Suggested fix:
Please change the behaviour back to the old ('show local status' for the new per-session status or something, 'show status' for global status), or at least document the new behaviour.
[28 Apr 2006 12:27] MySQL Verification Team
Thank you for the bug report. Duplicate of bug:
http://bugs.mysql.com/bug.php?id=19093