1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

mtr: print a detailed warning on a uninit assignment in the [ENV] group

spider suites: #varname is a valid syntax for a variable name, don't use it for comments
This commit is contained in:
Sergei Golubchik
2013-12-25 10:13:15 +01:00
parent a1a49ec9ed
commit 1df23d6f0f
6 changed files with 151 additions and 144 deletions

View File

@ -4265,11 +4265,18 @@ sub run_testcase ($$) {
#
foreach my $option ($config->options_in_group("ENV"))
{
# Save old value to restore it before next time
$old_env{$option->name()}= $ENV{$option->name()};
my ($name, $val)= ($option->name(), $option->value());
mtr_verbose($option->name(), "=",$option->value());
$ENV{$option->name()}= $option->value();
# Save old value to restore it before next time
$old_env{$name}= $ENV{$name};
unless (defined $val) {
mtr_warning("Uninitialized value for ", $name,
", group [ENV], file ", $current_config_name);
} else {
mtr_verbose($name, "=", $val);
$ENV{$name}= $val;
}
}
}