Commit 422ba205 authored by Sergei Golubchik's avatar Sergei Golubchik

mtr sets MYSQLTEST_REAL_VARDIR when MYSQLTEST_VARDIR is a symlink

this fixes main.mysqld--defaults-file failure with --mem
parent fad47df9
...@@ -37,7 +37,7 @@ exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1; ...@@ -37,7 +37,7 @@ exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1;
--echo # --echo #
--echo # Test on `defaults-file` --echo # Test on `defaults-file`
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_REAL_VARDIR MYSQLTEST_VARDIR
exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 1 'Default options are read'; exec $MYSQLD --defaults-file=$MYSQLTEST_VARDIR/my.cnf --help --verbose | grep -A 1 'Default options are read';
--echo # Test on `defaults-extra-file` --echo # Test on `defaults-extra-file`
......
...@@ -79,7 +79,6 @@ BEGIN { ...@@ -79,7 +79,6 @@ BEGIN {
use lib "lib"; use lib "lib";
use Cwd ; use Cwd ;
use Cwd 'realpath';
use Getopt::Long; use Getopt::Long;
use My::File::Path; # Patched version of File::Path use My::File::Path; # Patched version of File::Path
use File::Basename; use File::Basename;
...@@ -104,6 +103,8 @@ use IO::Socket::INET; ...@@ -104,6 +103,8 @@ use IO::Socket::INET;
use IO::Select; use IO::Select;
use Time::HiRes qw(gettimeofday); use Time::HiRes qw(gettimeofday);
sub realpath($) { (IS_WINDOWS) ? $_[0] : Cwd::realpath($_[0]) }
require "mtr_process.pl"; require "mtr_process.pl";
require "mtr_io.pl"; require "mtr_io.pl";
require "mtr_gprof.pl"; require "mtr_gprof.pl";
...@@ -1650,7 +1651,7 @@ sub command_line_setup { ...@@ -1650,7 +1651,7 @@ sub command_line_setup {
my $vardir_location= (defined $ENV{MTR_BINDIR} my $vardir_location= (defined $ENV{MTR_BINDIR}
? "$ENV{MTR_BINDIR}/mysql-test" ? "$ENV{MTR_BINDIR}/mysql-test"
: $glob_mysql_test_dir); : $glob_mysql_test_dir);
$vardir_location= realpath $vardir_location unless IS_WINDOWS; $vardir_location= realpath $vardir_location;
$default_vardir= "$vardir_location/var"; $default_vardir= "$vardir_location/var";
if ( ! $opt_vardir ) if ( ! $opt_vardir )
...@@ -2454,6 +2455,7 @@ sub environment_setup { ...@@ -2454,6 +2455,7 @@ sub environment_setup {
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'}; $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir; $ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir; $ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
$ENV{'MYSQLTEST_REAL_VARDIR'}= realpath $opt_vardir;
$ENV{'MYSQL_BINDIR'}= $bindir; $ENV{'MYSQL_BINDIR'}= $bindir;
$ENV{'MYSQL_SHAREDIR'}= $path_language; $ENV{'MYSQL_SHAREDIR'}= $path_language;
$ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir; $ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir;
......
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