Bug #35420 defaults-file displayed incorrectly in mysqld --help --verbose output
Submitted: 18 Mar 2008 22:40
Reporter: Kolbe Kegel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.56 OS:Any
Assigned to: CPU Architecture:Any

[18 Mar 2008 22:40] Kolbe Kegel
Description:
The list of option files shown in mysqld --help --verbose output is incorrect when --defaults-file is used.

How to repeat:
touch ./test.cnf
mysqld --defaults-file=./test.cnf --help --verbose | grep cnf

/etc/my.cnf /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 

Not only should "./test.cnf" be the only item in this list, it is not listed *at all* in this list.

Note: This problem does not appear to actually affect the files *read* by mysqld when the defaults-file option is used. The server appears to only read the specified file, as expected.

Though this seems to be purely cosmetic, I worry that it could be a
manifestation of underlying problems or could cause problems if any
utilities (or persons!) attempt to parse the output of mysqld --help
--verbose.

Suggested fix:
1) the argument to defaults-file should be included in the list of option files shown in mysqld --help --verbose output

2) if defaults-file is used, all things other than the argument to defaults-file should be excluded from the list of option files shown in mysqld --help --verbose output