Skip to content

Commit a88a433

Browse files
committed
mtr failed to detect when a combination is forced
mtr detects a forced combination if the command line for a test already includes all options from this combination. options are stored in a perl hash as (key,value) pairs. this breaks if the command line has two options with the same name, like --plugin-load-add=foo --plugin-load-add=bar, and the combination forces plugin foo. In particular, this resulted in warnings when running federated.federatedx_versioning test
1 parent d7f4fd3 commit a88a433

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysql-test/lib/My/Options.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ sub diff {
142142

143143
sub is_subset {
144144
my ($set, $subset)= @_;
145-
my %cache = map { _split_option($_) } @$set;
145+
my %cache = map { join('=', _split_option($_)), 1 } @$set;
146146

147147
for (@$subset){
148148
my ($name, $value)= _split_option($_);
149-
return 0 unless exists $cache{$name} and $cache{$name} eq $value;
149+
return 0 unless $cache{"$name=$value"};
150150
}
151151

152152
return 1;

0 commit comments

Comments
 (0)