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