Commit 92637e32 authored by Bjorn Munch's avatar Bjorn Munch

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
parent a4252ac0
...@@ -3202,7 +3202,7 @@ sub run_testcase ($) { ...@@ -3202,7 +3202,7 @@ sub run_testcase ($) {
{ {
# Remove old datadirs # Remove old datadirs
clean_datadir(); clean_datadir() unless $opt_start_dirty;
# Restore old ENV # Restore old ENV
while (my ($option, $value)= each( %old_env )) { while (my ($option, $value)= each( %old_env )) {
...@@ -4503,6 +4503,8 @@ sub start_servers($) { ...@@ -4503,6 +4503,8 @@ sub start_servers($) {
my $mysqld_basedir= $mysqld->value('basedir'); my $mysqld_basedir= $mysqld->value('basedir');
if ( $basedir eq $mysqld_basedir ) if ( $basedir eq $mysqld_basedir )
{
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
{ {
# Copy datadir from installed system db # Copy datadir from installed system db
for my $path ( "$opt_vardir", "$opt_vardir/..") { for my $path ( "$opt_vardir", "$opt_vardir/..") {
...@@ -4513,6 +4515,7 @@ sub start_servers($) { ...@@ -4513,6 +4515,7 @@ sub start_servers($) {
mtr_error("Failed to copy system db to '$datadir'") mtr_error("Failed to copy system db to '$datadir'")
unless -d $datadir; unless -d $datadir;
} }
}
else else
{ {
mysql_install_db($mysqld); # For versional testing mysql_install_db($mysqld); # For versional testing
......
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