Bug #28409 global variables of SHOW SESSION STATUS are not documented
Submitted: 14 May 2007 7:14 Modified: 8 Aug 2007 3:07
Reporter: Jan Kneschke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[14 May 2007 7:14] Jan Kneschke
Description:
On

http://dev.mysql.com/doc/refman/5.1/en/show-status.html

it reads:

  "Some status variables have only a global value. For these, you get the same value for both GLOBAL and SESSION."

Only a comment on

http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html

puts some light on this topic. 

How to repeat:
Check the URLs

Suggested fix:
Document all non-session variables which are listing the SHOW SESSION STATUS.
[14 May 2007 7:47] Sveta Smirnova
Thank you for the report.

There is next text above the quote which you provided:

With the GLOBAL modifier, SHOW STATUS displays the status values for all connections to MySQL. With SESSION, it displays the status values for the current connection. If no modifier is present, the default is SESSION. LOCAL is a synonym for SESSION.

Please confirm if this is not clear for you or desribe more accurately what do you want to change in the manual.
[14 May 2007 8:09] Jan Kneschke
All innodb_* and key_* status counters are always global:

mysql> show global status like "Key_%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| Key_blocks_not_flushed | 0     |
| Key_blocks_unused      | 14345 |
| Key_blocks_used        | 7     |
| Key_read_requests      | 5040  |
| Key_reads              | 34084 |
| Key_write_requests     | 38348 |
| Key_writes             | 18    |
+------------------------+-------+
7 rows in set (0.00 sec)

mysql> show session status like "Key_%";
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| Key_blocks_not_flushed | 0     |
| Key_blocks_unused      | 14345 |
| Key_blocks_used        | 7     |
| Key_read_requests      | 5040  |
| Key_reads              | 34084 |
| Key_write_requests     | 38348 |
| Key_writes             | 18    |
+------------------------+-------+
7 rows in set (0.01 sec)

The documentation only says that "some" a always global, but it doesn't say which of them.
[14 May 2007 8:24] Sveta Smirnova
Thank you for the additional explanation.

Verified as described.
[8 Aug 2007 3:07] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

The global/session scope of the status variables now is listed here:

http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html
http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html