MDEV-33265 mariadb-secure-installation fails with --defaults-group-suffix
Reason for the error is that --defaults-group-suffix is passed twice to the command line client, and option parser is not prepared for this. Double occurence of comes from 2 invocations of parse_arguments(), which appends unparsed arguments each time it is called. Fixed by treating --defaults-group-suffix like other "--defaults-" (--defaults-file/--defaults-extra-file). it will be parsed, and thus passed only once to the command line client.
This commit is contained in:
parent
3a38a7a4ac
commit
26192a4665
@ -27,6 +27,7 @@ echo_c=
|
||||
basedir=
|
||||
defaults_file=
|
||||
defaults_extra_file=
|
||||
defaults_group_suffix=
|
||||
no_defaults=
|
||||
|
||||
parse_arg()
|
||||
@ -52,6 +53,7 @@ parse_arguments()
|
||||
--basedir=*) basedir=`parse_arg "$arg"` ;;
|
||||
--defaults-file=*) defaults_file="$arg" ;;
|
||||
--defaults-extra-file=*) defaults_extra_file="$arg" ;;
|
||||
--defaults-group-suffix=*) defaults_group_suffix="$arg" ;;
|
||||
--no-defaults) no_defaults="$arg" ;;
|
||||
*)
|
||||
if test -n "$pick_args"
|
||||
@ -184,7 +186,7 @@ fi
|
||||
|
||||
# Now we can get arguments from the group [client] and [client-server]
|
||||
# in the my.cfg file, then re-run to merge with command line arguments.
|
||||
parse_arguments `$print_defaults $defaults_file $defaults_extra_file $no_defaults client client-server client-mariadb`
|
||||
parse_arguments `$print_defaults $defaults_file $defaults_extra_file $defaults_group_suffix $no_defaults client client-server client-mariadb`
|
||||
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||
|
||||
set_echo_compat() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user