summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl22
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;
}