Commit 8873148d authored by Magnus Svensson's avatar Magnus Svensson

BUG#39008 Additional fix after review, remove files that could potentially be...

BUG#39008 Additional fix after review, remove files that could potentially be set to path outside datadir
parent 9ffab585
...@@ -4099,9 +4099,26 @@ sub start_servers($) { ...@@ -4099,9 +4099,26 @@ sub start_servers($) {
} }
my $datadir= $mysqld->value('datadir'); my $datadir= $mysqld->value('datadir');
if (!$opt_start_dirty) if ($opt_start_dirty)
{ {
# Don't delete anything if starting dirty # Don't delete anything if starting dirty
;
}
else
{
my @options= ('log-bin', 'relay-log');
foreach my $option_name ( @options ) {
next unless $mysqld->option($option_name);
my $file_name= $mysqld->value($option_name);
next unless
defined $file_name and
-e $file_name;
mtr_debug(" -removing '$file_name'");
unlink($file_name) or die ("unable to remove file '$file_name'");
}
if (-d $datadir ) { if (-d $datadir ) {
mtr_verbose(" - removing '$datadir'"); mtr_verbose(" - removing '$datadir'");
......
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