Commit f7a10b55 authored by Matthias Leich's avatar Matthias Leich

Merge of latest changes into local tree

parents 86cb0d8c a11f9409
#!/usr/bin/perl #!/usr/bin/perl
use Getopt::Long; use Getopt::Long;
use POSIX qw(strftime); use POSIX qw(strftime getcwd);
$|=1; $|=1;
$VER="2.16"; $VER="2.16";
...@@ -295,6 +295,7 @@ sub start_mysqlds() ...@@ -295,6 +295,7 @@ sub start_mysqlds()
{ {
@options = defaults_for_group($groups[$i]); @options = defaults_for_group($groups[$i]);
$basedir_found= 0; # The default
$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";
...@@ -310,6 +311,14 @@ sub start_mysqlds() ...@@ -310,6 +311,14 @@ sub start_mysqlds()
$com= $options[$j]; $com= $options[$j];
$mysqld_found= 1; $mysqld_found= 1;
} }
elsif ("--basedir=" eq substr($options[$j], 0, 10))
{
$basedir= $options[$j];
$basedir =~ s/^--basedir=//;
$basedir_found= 1;
$options[$j]= quote_shell_word($options[$j]);
$tmp.= " $options[$j]";
}
else else
{ {
$options[$j]= quote_shell_word($options[$j]); $options[$j]= quote_shell_word($options[$j]);
...@@ -337,7 +346,16 @@ sub start_mysqlds() ...@@ -337,7 +346,16 @@ sub start_mysqlds()
print "group [$groups[$i]] separately.\n"; print "group [$groups[$i]] separately.\n";
exit(1); exit(1);
} }
if ($basedir_found)
{
$curdir=getcwd();
chdir($basedir) or die "Can't change to datadir $basedir";
}
system($com); system($com);
if ($basedir_found)
{
chdir($curdir) or die "Can't change back to original dir $curdir";
}
} }
if (!$i && !$opt_no_log) if (!$i && !$opt_no_log)
{ {
......
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