Bug #63672 mysql --init-command is not documented
Submitted: 8 Dec 2011 15:28 Modified: 7 Mar 2012 2:48
Reporter: Bill Karwin (Candidate Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5.18 OS:Any
Assigned to: John Russell CPU Architecture:Any

[8 Dec 2011 15:28] Bill Karwin
Description:
The mysql monitor supports a command option --init-command.  

This option works fine, approximately as expected given its description in the help text.

However, the option is not documented in the manual for mysql monitor options.

How to repeat:
1. Demonstrate that the option works:

$ mysql --init-command="SET @somevar:=100"

mysql> select @somevar;
+----------+
| @somevar |
+----------+
|      100 |
+----------+

2. Observe that this option appears in the output of mysql --help:

  --init-command=name SQL Command to execute when connecting to MySQL server.

2. Observe that the option is documented at the connection API level:

http://dev.mysql.com/doc/refman/5.5/en/mysql-options.html

3. Observe that the option does not appear in the manual for the mysql monitor, whereas other general connection API options are, for example --compress, --local-infile, etc. 

http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html

Suggested fix:
Please at least add the help text for this option to the manual for mysql monitor command options.
[8 Dec 2011 15:34] Peter Laursen
For the C-API it is documented here: 
http://dev.mysql.com/doc/refman/5.5/en/mysql-options.html

But not for the command line client it seems
http://dev.mysql.com/doc/refman/5.5/en/mysql-command-options.html

Peter
(not a MySQL person)
[8 Dec 2011 15:35] Peter Laursen
oops .. nothing new in my post. sorry.
[8 Dec 2011 15:59] Valeriy Kravchuk
Thank you for the documentation request.
[7 Mar 2012 2:48] 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.