summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2009-04-30 13:23:36 +0200
committerBjorn Munch <Bjorn.Munch@sun.com>2009-04-30 13:23:36 +0200
commitcf1845f4da8ae1208ca3da8e83329784099ae4f6 (patch)
tree85009406b0bb50fb62ed997f22cd28ce24b5ee93 /mysql-test/mysql-test-run.pl
parent261066e25155c6a84449f5ff31f7de187216ee71 (diff)
downloadmariadb-git-cf1845f4da8ae1208ca3da8e83329784099ae4f6.tar.gz
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
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl19
1 files changed, 11 insertions, 8 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 5153a59135f..9f08d0e3c32 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -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
{