Bug #72320 --debug-info ignored when --debug-check is used
Submitted: 11 Apr 2014 22:45 Modified: 14 Apr 2014 5:54
Reporter: Erico Fusco (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.17 OS:Any
Assigned to: CPU Architecture:Any

[11 Apr 2014 22:45] Erico Fusco
Description:
If debug-check is set, the flag for debug_info is removed. 

When debug-info is used without debug-check, it set both flags (info and check), however, --debug-check removes the flag from debug-info. They should work independently. 

The same issue occurs on all clients (mysql,mysqladmin,mysqldump,...)

In addition, the manual doesn't say correctly why debug check is for.  This flag is used to check for opened files when the client exits and print them (mysys/my_init.c:145)

http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_debug-check

How to repeat:
Use debug-info and debug-check options with the client.

Suggested fix:
Use the flags MY_CHECK_ERROR and MY_GIVE_INFO correctly.
[11 Apr 2014 22:47] Erico Fusco
Patch for mysql attached, a similar patch needs to be applied for all other clients.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: mysql.patch (application/octet-stream, text), 178 bytes.

[14 Apr 2014 5:54] MySQL Verification Team
Hello Erico,

Thank you for the report and contribution.

Thanks,
Umesh
[30 Apr 2014 14:25] Georgi Kodinov
Just want to point out that --debug-info is a super-set of --debug-check by design. See bug #30127 for details.