From f480d64fdf8f4b389cca1043cae5ca7c76f066e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Apr 2008 15:52:50 +0200 Subject: [PATCH 1/2] Remove hack for mtr.pl in MySQL 4.1 --- mysql-test/mysql-test-run.pl | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 0988905b44f..07362c65921 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -573,21 +573,6 @@ sub command_line_setup { { $opt_vardir= $default_vardir; } - elsif ( $mysql_version_id < 50000 and - $opt_vardir ne $default_vardir) - { - # Version 4.1 and --vardir was specified - # Only supported as a symlink from var/ - # by setting up $opt_mem that symlink will be created - if ( ! IS_WINDOWS ) - { - # Only platforms that have native symlinks can use the vardir trick - $opt_mem= $opt_vardir; - mtr_report("Using 4.1 vardir trick"); - } - - $opt_vardir= $default_vardir; - } $path_vardir_trace= $opt_vardir; # Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/... From ecc6795c45fc676dca657d4144cc5e5a6ec47e70 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 May 2008 09:34:25 +0200 Subject: [PATCH 2/2] Use the deignated tmpdir if it exists --- mysql-test/mysql-test-run.pl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 07362c65921..6d1e9a82926 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -773,7 +773,13 @@ sub set_mtr_build_thread_ports($) { sub collect_mysqld_features { my $found_variable_list_start= 0; - my $tmpdir= tempdir(CLEANUP => 0); # Directory removed by this function + my $use_tmpdir; + if ( defined $opt_tmpdir and -d $opt_tmpdir){ + # Create the tempdir in $opt_tmpdir + $use_tmpdir= $opt_tmpdir; + } + my $tmpdir= tempdir(CLEANUP => 0, # Directory removed by this function + DIR => $use_tmpdir); # # Execute "mysqld --no-defaults --help --verbose" to get a @@ -3566,7 +3572,7 @@ sub gdb_arguments { # Write $args to gdb init file my $str= join(" ", @$$args); - my $gdb_init_file= "$opt_tmpdir/gdbinit.$type"; + my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type"; # Remove the old gdbinit file unlink($gdb_init_file); @@ -3630,7 +3636,7 @@ sub ddd_arguments { # Write $args to ddd init file my $str= join(" ", @$$args); - my $gdb_init_file= "$opt_tmpdir/gdbinit.$type"; + my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type"; # Remove the old gdbinit file unlink($gdb_init_file);