Bug #24036 "FLUSH STATUS" does not reset global Com_% status variables - part2
Submitted: 7 Nov 2006 9:25 Modified: 17 Jan 2007 20:45
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[7 Nov 2006 9:25] Magnus Blåudd
We have found out that FLUSH STATUS in 5.0 does not really behave as in 4.1, it's not possible to change this now. It would be good if we could describe this in the manual.

Status variables are currently as of 5.0 counted per thread and accumulated in
global counters when the thread ends.

It's _not_ possible to reset all of the global varaibles with FLUSH STAUS, it
will only reset some global variables and all thread status variables.

FLUSH STATUS currently does this:
 -  Adds thread's status variabes to global status
 -  Reset thread's status variables
 -  Reset the global variables which are declared with type SHOW_LONG in the
"status_vars" array
 - Reset the counters of all key caches (default and named).
 - Set max_used_connections to the number of currently open

How to repeat:
Please see bug#22875, it's a feature request to add FLUSH GLOBAL STATUS

Suggested fix:
Document now and fix in later version according to bug#22875(wich probably will be converted to a worklog)
[17 Jan 2007 20:45] 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.

Updating 5.0/5.1 manuals to say this:

This option adds the current thread's session status variable values
to the global values and resets the session values to zero. It also
resets the counters for key caches (default and named) to zero and sets
<literal>Max_used_conections</literal> to the current number of
open connections.