1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-26238: Remove inconsistent behaviour of --default-* options

in my_print_defaults

Analysis: --defaults* option is recognized anywhere in the commandline
instead of only at the beginning because handle_options() recognizes
options in any order.
Fix: use get_defaults_options() which recognizes --defaults* options only at
the beginning. After this is done, we only want to recognize other options
given in any order which can be done using handle_options(). So only skip
--defaults* options and pass rest of them to handle_options().
Also, removed -e, -g and -c because only my_print_defaults supports them.
This commit is contained in:
Rucha Deodhar
2021-09-01 19:09:01 +05:30
committed by Sergei Golubchik
parent b18697fd3e
commit 5217211e07
4 changed files with 109 additions and 76 deletions

View File

@ -964,8 +964,8 @@ DROP TABLE t1, t2;
[mysqltest1]
port=1234
EOF
--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-file=$MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1
--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-extra-file=$MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
--remove_file $MYSQLTEST_VARDIR/tmp/tmp.cnf
--echo #