diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-31 13:03:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-31 13:03:09 +0300 |
commit | 9f779d34a13139d405b1c2cb9f2fcec95abc1fea (patch) | |
tree | c4244e32df98cce499978e241ac951d566212657 /mysql-test/lib | |
parent | e5b16cf8dec403a576078bbf9f1b3eaf392fae2e (diff) | |
parent | e94172c2a07f21118d26e4cde0c48a2fd536cf06 (diff) | |
download | mariadb-git-bb-10.6-MDEV-25919.tar.gz |
Merge 10.6bb-10.6-MDEV-25919
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/My/Options.pm | 22 | ||||
-rw-r--r-- | mysql-test/lib/mtr_cases.pm | 6 |
2 files changed, 11 insertions, 17 deletions
diff --git a/mysql-test/lib/My/Options.pm b/mysql-test/lib/My/Options.pm index 6e0efe862e7..5827e0666a6 100644 --- a/mysql-test/lib/My/Options.pm +++ b/mysql-test/lib/My/Options.pm @@ -140,24 +140,16 @@ sub diff { } -sub is_set { - my ($opts, $set_opts)= @_; +sub is_subset { + my ($set, $subset)= @_; + my %cache = map { _split_option($_) } @$set; - foreach my $opt (@$opts){ - - my ($opt_name1, $value1)= _split_option($opt); - - foreach my $set_opt (@$set_opts){ - my ($opt_name2, $value2)= _split_option($set_opt); - - if ($opt_name1 eq $opt_name2 and $value1 eq $value2){ - # Option already set - return 1; - } - } + for (@$subset){ + my ($name, $value)= _split_option($_); + return 0 unless exists $cache{$name} and $cache{$name} eq $value; } - return 0; + return 1; } diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index dd003dea31d..adc911ba937 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -626,8 +626,10 @@ sub make_combinations($$@) { # Skip all other combinations if the values they change # are already fixed in master_opt or slave_opt - if (My::Options::is_set($test->{master_opt}, $comb->{comb_opt}) && - My::Options::is_set($test->{slave_opt}, $comb->{comb_opt}) ){ + # (empty combinations are not considered a subset of anything) + if (@{$comb->{comb_opt}} && + My::Options::is_subset($test->{master_opt}, $comb->{comb_opt}) && + My::Options::is_subset($test->{slave_opt}, $comb->{comb_opt}) ){ $test_combs->{$comb->{name}} = 2; |