diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2021-02-17 04:45:53 +0100 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2021-03-16 11:30:36 +0100 |
commit | bf303e824cec48e10eba18c5dab86a8cdd1af850 (patch) | |
tree | adaef316e1a625bd8661fc18ac6eafe11ef262ea /scripts/mysqld_multi.sh | |
parent | f2c79eda4bf9279f5fcdc6c0905e5a8127a697b8 (diff) | |
download | mariadb-git-bf303e824cec48e10eba18c5dab86a8cdd1af850.tar.gz |
MDEV-21039: Server fails to start with unknown mysqld_safe options
Adding any unknown option to the "[mysqld_safe]" section makes
mysqld impossible to start with mysqld_multi. For example, after
adding the unknown option "numa_interleave" to the "[mysqld_safe]"
section, mysqld_multi exits with the following diagnostics:
[ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave'
To get rid of this behavior, this patch adds the passing of the default
group suffix from mysqld_multi to the mysqld_safe side.
Diffstat (limited to 'scripts/mysqld_multi.sh')
-rw-r--r-- | scripts/mysqld_multi.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 0b33f61710e..77ed36218d3 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -308,7 +308,9 @@ sub report_mysqlds sub start_mysqlds() { - my (@groups, $com, $tmp, $i, @options, $j, $mysqld_found, $info_sent); + my (@groups, $com, $tmp, $i, @options, $j, $mysqld_found, $suffix_found, $info_sent); + + $suffix_found= 0; if (!$opt_no_log) { @@ -327,6 +329,7 @@ sub start_mysqlds() $mysqld_found= 1; # The default $mysqld_found= 0 if (!length($mysqld)); $com= "$mysqld"; + for ($j = 0, $tmp= ""; defined($options[$j]); $j++) { if ("--mysqladmin=" eq substr($options[$j], 0, 13)) @@ -347,6 +350,10 @@ sub start_mysqlds() $options[$j]= quote_shell_word($options[$j]); $tmp.= " $options[$j]"; } + elsif ("--defaults-group-suffix=" eq substr($options[$j], 0, 24)) + { + $suffix_found= 1; + } else { $options[$j]= quote_shell_word($options[$j]); @@ -363,6 +370,12 @@ sub start_mysqlds() $info_sent= 1; } + if (!$suffix_found) + { + $com.= " --defaults-group-suffix="; + $com.= substr($groups[$i],6); + } + $com.= $tmp; if ($opt_wsrep_new_cluster) { |