diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-31 08:36:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-31 08:36:59 +0300 |
commit | e835cc851e389770219a33037af65db8887cc9a8 (patch) | |
tree | 84305de5bfaf4d2e2fc8977cd118b5820f8e581f /mysql-test/lib/My | |
parent | b378ddb3d3c3af75195d328018259369671bb029 (diff) | |
parent | ceb40ef45b735f7e35aa87306b220a8493f4d754 (diff) | |
download | mariadb-git-e835cc851e389770219a33037af65db8887cc9a8.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/lib/My')
-rw-r--r-- | mysql-test/lib/My/Options.pm | 22 |
1 files changed, 7 insertions, 15 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; } |