Commit 9044a653 authored by unknown's avatar unknown

Remember dynamically set options as started


mysql-test/lib/My/Options.pm:
  Add conversion from --set-variable=name=value to SET GLOBAL name=value
parent 821d34bc
......@@ -168,9 +168,14 @@ sub toSQL {
foreach my $option (@options) {
my ($name, $value)= _split_option($option);
#print "name: $name\n";
#print "value: $value\n";
if ($name =~ /^O, (.*)/){
push(@sql, "SET GLOBAL $1=$value");
} else {
}
elsif ($name =~ /^set-variable=(.*)/){
push(@sql, "SET GLOBAL $1=$value");
}
else {
my $sql_name= $name;
$sql_name=~ s/-/_/g;
push(@sql, "SET GLOBAL $sql_name=$value");
......
......@@ -2833,16 +2833,14 @@ sub server_need_restart {
my $query= My::Options::toSQL(@diff_opts);
mtr_verbose("Attempting dynamic switch '$query'");
if (run_query($tinfo, $server, $query)){
mtr_verbose("Restart: Dynamic switch failed");
return 1;
}
else
{
mtr_verbose("Restart: running with different options '" .
join(" ", @{$extra_opts}) . "' != '" .
join(" ", @{$server->{'started_opts'}}) . "'" );
return 1;
}
# Remember the dynamically set options
$server->{'started_opts'}= $extra_opts;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment