Bug #77455 Program "mysql" will reject option "--debug" and will abort
Submitted: 23 Jun 2015 14:08 Modified: 24 Dec 2015 10:42
Reporter: Jörg Brühe (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.5+ OS:Any
Assigned to: CPU Architecture:Any
Tags: client, debug

[23 Jun 2015 14:08] Jörg Brühe
Description:
For the command-line client "mysql", the manual documents an option "--debug":
https://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html
https://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html

With the binaries provided by Oracle, this option cannot be used.

What's even worse: If it is given, the program will not ignore it but rather abort after giving an error message.

How to repeat:
Just try it ...

mysql@support:~ [mysqld-5529, 3329]> mysql -u root -e "show global variables like 'version%' "
+-------------------------+------------------------------+
| Variable_name           | Value                        |
+-------------------------+------------------------------+
| version                 | 5.5.29-log                   |
| version_comment         | MySQL Community Server (GPL) |
| version_compile_machine | x86_64                       |
| version_compile_os      | linux2.6                     |
+-------------------------+------------------------------+
mysql@support:~ [mysqld-5529, 3329]> mysql -u root -e "show global variables like 'version%' " --debug
mysql: ERROR: Option 'debug' used, but is disabled
mysql@support:~ [mysqld-5529, 3329]>

Suggested fix:
Documentation:
Add a note that "--debug" does not work with Oracle-provided binaries, but rather needs a "mysql" compiled with debugging options.
On that occasion, add an explanation of the "debug options" that may be given.

Code:
Change the error message into a warning that the option is disabled and will be ignored,
but let the program continue and perform its function.
[24 Jun 2015 7:19] MySQL Verification Team
Hello Jörg Brühe,

Thank you for the report.

Thanks,
Umesh
[27 Nov 2015 11:46] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.
[27 Nov 2015 11:50] Jon Stephens
With the docs updated, I've re-opened this as a Server:Errors issue in order for Dev to address Jörg's feature request.