Bug #69624 Sometimes Memory + Events status are printed to error log on mysqld shutdown
Submitted: 30 Jun 2013 13:48 Modified: 26 Nov 2014 15:31
Reporter: Przemyslaw Malkowski Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: COM_DEBUG, debug, error log, mysql_print_status()

[30 Jun 2013 13:48] Przemyslaw Malkowski
Description:
I cannot see any information in http://dev.mysql.com/doc/refman/5.5/en/mysqladmin.html 
or
http://dev.mysql.com/doc/refman/5.5/en/error-log.html 
or
http://dev.mysql.com/doc/internals/en/text-protocol.html#com-debug

on which condition MySQL will print the Memory status + Events status debug sections to error log on mysqld shutdown. 
I am able to reproduce that this info is logged also on server shutdown after "mysqladmin debug" is run during the work. 
But I also noticed this happened earlier on some shutdowns without my interference, and no idea what has triggered those.

How to repeat:
- While MySQL is running:

mysqladmin debug

- This will print all, or almost all debug sections (of mysql_print_status() function) to the error log, like "Status information", "Current locks", "Memory status", "Events status", "Key caches", "handler status", "Table status", "Alarm status")

- After some time:

/etc/init.d/mysql restart

- Debug info sections are printed to error log, but ONLY containing "Memory status" and "Events status" sections. 
This info is included between "[Note] /usr/sbin/mysqld: Shutdown complete" and " mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended" lines.

Suggested fix:
Make clear about in what conditions the "Memory status" and "Events status" debug information sections are logged in error log on server shutdown.
[30 Jun 2013 14:29] MySQL Verification Team
Happens on SIGHUP too.  Does this answer your question:
http://dev.mysql.com/doc/refman/5.6/en/server-signal-response.html
[30 Jun 2013 18:31] Przemyslaw Malkowski
SIGHUP effect is the same as mysqladmin debug - more debug info is printed into error log (btw the doc about signal responses does not mention the memory nor events status sections).

While the debug info that is being logged on server shutdown consists ONLY memory and events status.
Also my point is to explain exactly WHEN this information is printed to error log ON SERVER SHUTDOWN (not on SIGHUP).
[24 Jul 2013 10:54] MySQL Verification Team
Hello Przemyslaw,

Thank you for the report.

Thanks,
Umesh
[26 Nov 2014 15:31] Paul DuBois
Bug#71346 mentions a feature request that has been filed to better deal with information such as this. Given that feature request, I am closing this docs bug with "Won't fix."