From 9018c56ac419a404a9656361cc6a3135549a3bb3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 May 2008 09:13:43 +0200 Subject: [PATCH] Bug#36463 mysql-test-run.pl should always use the --tmpdi mysql-test/mysql-test-run.pl: Use the requested tmpdir in 'collect_mysqld_features', create it if it does not already exists --- mysql-test/mysql-test-run.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7c4677b8274..829941545cd 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1367,7 +1367,15 @@ sub datadir_list_setup () { sub collect_mysqld_features () { my $found_variable_list_start= 0; - my $tmpdir= tempdir(CLEANUP => 0); # Directory removed by this function + my $tmpdir; + if ( $opt_tmpdir ) { + # Use the requested tmpdir + mkpath($opt_tmpdir) if (! -d $opt_tmpdir); + $tmpdir= $opt_tmpdir; + } + else { + $tmpdir= tempdir(CLEANUP => 0); # Directory removed by this function + } # # Execute "mysqld --no-defaults --help --verbose" to get a @@ -1428,7 +1436,7 @@ sub collect_mysqld_features () { } } } - rmtree($tmpdir); + rmtree($tmpdir) if (!$opt_tmpdir); mtr_error("Could not find version of MySQL") unless $mysql_version_id; mtr_error("Could not find variabes list") unless $found_variable_list_start;