diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-08-25 22:22:33 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-08-25 22:22:33 +0200 |
commit | 9bc9855c16f815e71223398ef17cd6052becc44e (patch) | |
tree | 89f63ff036ddfcf76bcdc342ec71e0129ba42c89 /mysql-test/mysql-test-run.pl | |
parent | 1aa3b02c51f00c142fb89c809e6228d6f99288d9 (diff) | |
download | mariadb-git-9bc9855c16f815e71223398ef17cd6052becc44e.tar.gz |
mtr changes:
* expanding unknown env variable does not abort mtr
* have_archive, blackhole, innodb - preload the corresponding engine
* all options from .opt files get equal treatment, all are searched for special options,
not only -{master,slave}.opt as before (which ignored suite.opt and --mysqld=...)
* --plugin-load gets special treatment too - all instances are merged into one
* federated test fixed to preload federated
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 25b881488db..98e116b4217 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3564,8 +3564,9 @@ sub timezone { my ($tinfo)= @_; local $_ = $tinfo->{timezone}; return 'DEFAULT' unless defined $_; - s/\$\{(\w+)\}/envsubst($1)/ge; - s/\$(\w+)/envsubst($1)/ge; + no warnings 'uninitialized'; + s/\$\{(\w+)\}/$ENV{$1}/ge; + s/\$(\w+)/$ENV{$1}/ge; $_; } @@ -5071,18 +5072,6 @@ sub started { return grep(defined $_, map($_->{proc}, @_)); } sub stopped { return grep(!defined $_, map($_->{proc}, @_)); } -sub envsubst { - my $string= shift; - - if ( ! defined $ENV{$string} ) - { - mtr_error(".opt file references '$string' which is not set"); - } - - return $ENV{$string}; -} - - sub get_extra_opts { my ($mysqld, $tinfo)= @_; @@ -5093,8 +5082,9 @@ sub get_extra_opts { # Expand environment variables foreach my $opt ( @$opts ) { - $opt =~ s/\$\{(\w+)\}/envsubst($1)/ge; - $opt =~ s/\$(\w+)/envsubst($1)/ge; + no warnings 'uninitialized'; + $opt =~ s/\$\{(\w+)\}/$ENV{$1}/ge; + $opt =~ s/\$(\w+)/$ENV{$1}/ge; } return $opts; } |