1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG#39008 Additional fix after review, remove files that could potentially be set to path outside datadir

This commit is contained in:
Magnus Svensson
2008-10-10 16:19:04 +02:00
parent 260c3491a9
commit ac24a79290

View File

@ -4099,9 +4099,26 @@ sub start_servers($) {
}
my $datadir= $mysqld->value('datadir');
if (!$opt_start_dirty)
if ($opt_start_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 ) {
mtr_verbose(" - removing '$datadir'");