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.
This commit is contained in:
parent
f2c79eda4b
commit
bf303e824c
@ -308,7 +308,9 @@ sub report_mysqlds
|
|||||||
|
|
||||||
sub start_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)
|
if (!$opt_no_log)
|
||||||
{
|
{
|
||||||
@ -327,6 +329,7 @@ sub start_mysqlds()
|
|||||||
$mysqld_found= 1; # The default
|
$mysqld_found= 1; # The default
|
||||||
$mysqld_found= 0 if (!length($mysqld));
|
$mysqld_found= 0 if (!length($mysqld));
|
||||||
$com= "$mysqld";
|
$com= "$mysqld";
|
||||||
|
|
||||||
for ($j = 0, $tmp= ""; defined($options[$j]); $j++)
|
for ($j = 0, $tmp= ""; defined($options[$j]); $j++)
|
||||||
{
|
{
|
||||||
if ("--mysqladmin=" eq substr($options[$j], 0, 13))
|
if ("--mysqladmin=" eq substr($options[$j], 0, 13))
|
||||||
@ -347,6 +350,10 @@ sub start_mysqlds()
|
|||||||
$options[$j]= quote_shell_word($options[$j]);
|
$options[$j]= quote_shell_word($options[$j]);
|
||||||
$tmp.= " $options[$j]";
|
$tmp.= " $options[$j]";
|
||||||
}
|
}
|
||||||
|
elsif ("--defaults-group-suffix=" eq substr($options[$j], 0, 24))
|
||||||
|
{
|
||||||
|
$suffix_found= 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$options[$j]= quote_shell_word($options[$j]);
|
$options[$j]= quote_shell_word($options[$j]);
|
||||||
@ -363,6 +370,12 @@ sub start_mysqlds()
|
|||||||
$info_sent= 1;
|
$info_sent= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$suffix_found)
|
||||||
|
{
|
||||||
|
$com.= " --defaults-group-suffix=";
|
||||||
|
$com.= substr($groups[$i],6);
|
||||||
|
}
|
||||||
|
|
||||||
$com.= $tmp;
|
$com.= $tmp;
|
||||||
|
|
||||||
if ($opt_wsrep_new_cluster) {
|
if ($opt_wsrep_new_cluster) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user