[MDEV-21374] When "--help --verbose" prints out configuration file paths, the --defaults-file option is not considered Created: 2019-12-20 Updated: 2020-03-31 Resolved: 2020-02-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration, Scripts & Clients |
| Affects Version/s: | 10.2.29, 10.1.43, 10.3.20, 10.4.11 |
| Fix Version/s: | 10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
mysqld and other utilities support the --help --verbose parameters. When these parameters are set, the utility will print out the configuration files that it reads:
The default paths for configuration files can be overridden by using the --defaults-file option. However, the --help --verbose parameters do not seem to take this option into account when printing configuration file paths:
|
| Comments |
| Comment by Anel Husakovic [ 2019-12-21 ] | |||||||||||||
|
So your point is if --defaults-file= =/tmp/my.cnf is supplied than output should be dynamically changed (or appended to previous /etc/my.cnf ~/.my.cnf):
right ? Isn't the current situation self explanatory? | |||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-12-21 ] | |||||||||||||
|
Hi anel,
Yes, exactly. The output is already changed dynamically in several cases. We just need to fix it so that it is also changed dynamically in the case that the --defaults-file option is set. For example, here's normal output:
And if you set the --defaults-extra-file option, then the output changes to this:
And if you set the $MYSQL_HOME environment variable, then the output changes to this:
| |||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-12-21 ] | |||||||||||||
|
Additionally, the -
And the output also changes if the $MYSQL_GROUP_SUFFIX environment variable is set:
| |||||||||||||
| Comment by Anel Husakovic [ 2019-12-27 ] | |||||||||||||
|
Hi GeoffMontee, | |||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-12-27 ] | |||||||||||||
|
Hi anel, That kind of change in behavior sounds like it would make it consistent to me. | |||||||||||||
| Comment by Anel Husakovic [ 2019-12-31 ] | |||||||||||||
|
Hi GeoffMontee,
Also the patch is fixing case for defaults-file-extra, where the file is translated to directory and my.cnf is appended, so it was:
right? | |||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-12-31 ] | |||||||||||||
|
Hi anel, Looks good to me! | |||||||||||||
| Comment by Vicențiu Ciorbaru [ 2020-02-22 ] | |||||||||||||
|
Ok to push | |||||||||||||
| Comment by Anel Husakovic [ 2020-02-22 ] | |||||||||||||
|
Pushed with b9689712e |