1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #44561 mtr2 --start-dirty is broken

start-dirty would remove stored procs etc.
Skip the copying back from stored system dir if using --start-dirty
This commit is contained in:
Bjorn Munch
2009-04-30 13:23:36 +02:00
parent 261066e251
commit cf1845f4da

View File

@ -3202,7 +3202,7 @@ sub run_testcase ($) {
{
# Remove old datadirs
clean_datadir();
clean_datadir() unless $opt_start_dirty;
# Restore old ENV
while (my ($option, $value)= each( %old_env )) {
@ -4504,14 +4504,17 @@ sub start_servers($) {
my $mysqld_basedir= $mysqld->value('basedir');
if ( $basedir eq $mysqld_basedir )
{
# Copy datadir from installed system db
for my $path ( "$opt_vardir", "$opt_vardir/..") {
my $install_db= "$path/install.db";
copytree($install_db, $datadir)
if -d $install_db;
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
{
# Copy datadir from installed system db
for my $path ( "$opt_vardir", "$opt_vardir/..") {
my $install_db= "$path/install.db";
copytree($install_db, $datadir)
if -d $install_db;
}
mtr_error("Failed to copy system db to '$datadir'")
unless -d $datadir;
}
mtr_error("Failed to copy system db to '$datadir'")
unless -d $datadir;
}
else
{