mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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:
@@ -27,6 +27,7 @@ echo_c=
|
|||||||
basedir=
|
basedir=
|
||||||
defaults_file=
|
defaults_file=
|
||||||
defaults_extra_file=
|
defaults_extra_file=
|
||||||
|
defaults_group_suffix=
|
||||||
no_defaults=
|
no_defaults=
|
||||||
|
|
||||||
parse_arg()
|
parse_arg()
|
||||||
@@ -52,6 +53,7 @@ parse_arguments()
|
|||||||
--basedir=*) basedir=`parse_arg "$arg"` ;;
|
--basedir=*) basedir=`parse_arg "$arg"` ;;
|
||||||
--defaults-file=*) defaults_file="$arg" ;;
|
--defaults-file=*) defaults_file="$arg" ;;
|
||||||
--defaults-extra-file=*) defaults_extra_file="$arg" ;;
|
--defaults-extra-file=*) defaults_extra_file="$arg" ;;
|
||||||
|
--defaults-group-suffix=*) defaults_group_suffix="$arg" ;;
|
||||||
--no-defaults) no_defaults="$arg" ;;
|
--no-defaults) no_defaults="$arg" ;;
|
||||||
*)
|
*)
|
||||||
if test -n "$pick_args"
|
if test -n "$pick_args"
|
||||||
@@ -184,7 +186,7 @@ fi
|
|||||||
|
|
||||||
# Now we can get arguments from the group [client] and [client-server]
|
# 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.
|
# 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 "$@"
|
parse_arguments PICK-ARGS-FROM-ARGV "$@"
|
||||||
|
|
||||||
set_echo_compat() {
|
set_echo_compat() {
|
||||||
|
Reference in New Issue
Block a user