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.