[MDEV-24248] my_print_defaults is not taking all the values when using -e option which is called from mysql.server (extra_args). Created: 2020-11-19 Updated: 2021-07-26 Resolved: 2021-07-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.5.8, 10.5 |
| Fix Version/s: | 10.5.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | suresh ramagiri | Assignee: | Rucha Deodhar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
It is reported by one of our customers the my_print_defaults -e option is not working with MariaDB server 10.5 Here are the test results: At MariaDB server 10.4.17, my_print_defaults -e giving the required output. Whereas at MariaDB server 10.5.x, -e option is not working instead has to specify --defaults-extra-file (alias). /root/my.cnf
/root/my.cnf
|
| Comments |
| Comment by Elena Stepanova [ 2020-11-24 ] | |||||||||
|
The difference comes from this commit:
| |||||||||
| Comment by Sergei Golubchik [ 2021-06-02 ] | |||||||||
|
mysql.server should use --defaults-extra-file not -e | |||||||||
| Comment by Rucha Deodhar [ 2021-06-08 ] | |||||||||
|
Latest patch: | |||||||||
| Comment by Sergei Golubchik [ 2021-06-10 ] | |||||||||
|
rucha174, no, as we discussed there should be no changes in my_default.c, instead my_print_defaults should generate a new command line specifically for calling load_default(), as doesn't make sense to reuse it in this case. | |||||||||
| Comment by Sergei Golubchik [ 2021-06-11 ] | |||||||||
|
There are two approaches, basically. One is to let handle_options() handle --defaults* options too. This will make -e to work, --defaults-extra-fileāµ to work, in any position on the command line, very flexible, anything works. But this is very inconsistent with how --default* options work in any other executable (only at the beginning on the command line, only with =). The other option is to let load_defaults() (that is, get_defaults_options()) handle --default* options. This will provide exactly the same behavior as elsewhere, so one won't, for example, wonder why --defaults-extra-file my.cnf works in my_print_defaults, but not in mysqldump. But -e and -g won't work. I personally think that the second option would be less confusing long term. | |||||||||
| Comment by Rucha Deodhar [ 2021-06-14 ] | |||||||||
|
Created a patch to address this specific issue by changing mysql.server script to use --defaults-extra-file instead of -e so that this issue can be closed faster. | |||||||||
| Comment by Sergei Golubchik [ 2021-07-12 ] | |||||||||
|
f88d130e710 is ok to push, thanks | |||||||||
| Comment by Rucha Deodhar [ 2021-07-23 ] | |||||||||
|
fixed failing test on buildbot | |||||||||
| Comment by Sergei Golubchik [ 2021-07-23 ] | |||||||||
|
How is | |||||||||
| Comment by Rucha Deodhar [ 2021-07-23 ] | |||||||||
|
Hi serg It is only MDEV-25908 is still open where I have fixed -e option 10.5 and removed short options for 10.7. | |||||||||
| Comment by Sergei Golubchik [ 2021-07-23 ] | |||||||||
|
Yes, you fixed it in https://github.com/MariaDB/server/commit/f88d130e710 | |||||||||
| Comment by Rucha Deodhar [ 2021-07-26 ] | |||||||||
|
closing the issue because fix is already pushed: https://github.com/MariaDB/server/commit/534553897f7178eb1456b11aa6c70f6025364407 |