summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-11 13:00:18 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-11 13:00:18 +0300
commitb42dbdbccd3b939394ca9b608ad91a04235e95f1 (patch)
treee969f314963faa202fdb6f87d5aca67810844742 /mysql-test/lib
parent490dcfd5d74ce45cbdd6105e4295116f6a944e2b (diff)
parentcbac8f935182ecc5bb907de3ae48942467f0b8ba (diff)
downloadmariadb-git-b42dbdbccd3b939394ca9b608ad91a04235e95f1.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/My/Config.pm17
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm8
2 files changed, 20 insertions, 5 deletions
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm
index 12647edf0a4..ecc0830c3df 100644
--- a/mysql-test/lib/My/Config.pm
+++ b/mysql-test/lib/My/Config.pm
@@ -21,6 +21,17 @@ use strict;
use warnings;
use Carp;
+# Define all MariaDB options that the user should be able to specify
+# many times in the config file. Note that options must be written
+# using '-' instead of '_' here!
+
+my %multipart_options=
+ (
+ "plugin-load-add" => 1,
+ "optimizer-switch" => 1,
+);
+
+
sub new {
my ($class, $option_name, $option_value)= @_;
my $self= bless { name => $option_name,
@@ -327,7 +338,6 @@ sub new {
# Skip comment
next;
}
-
else {
croak "Unexpected line '$line' found in '$path'";
}
@@ -355,6 +365,11 @@ sub insert {
if ( defined $option ) {
#print "option: $option, value: $value\n";
+ my $tmp_option= $option;
+ $tmp_option =~ s/_/-/g;
+
+ # If the option is an option that one can specify many times, always add
+ $if_not_exist= 1 if ($multipart_options{$tmp_option});
# Add the option to the group
$group->insert($option, $value, $if_not_exist);
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index cae2c8c33e5..72d7600e8df 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -311,7 +311,7 @@ sub post_check_client_groups {
$first_mysqld->name());
# Then generate [client.<suffix>] for each [mysqld.<suffix>]
- foreach my $mysqld ( $config->like('mysqld.') ) {
+ foreach my $mysqld ( $config->like('mysqld\.') ) {
$self->post_check_client_group($config,
'client'.$mysqld->after('mysqld'),
$mysqld->name())
@@ -333,7 +333,7 @@ sub post_check_embedded_group {
my $mysqld= $config->group('mysqld') or
croak "Can't run with embedded, config has no default mysqld section";
- my $first_mysqld= $config->first_like('mysqld.') or
+ my $first_mysqld= $config->first_like('mysqld\.') or
croak "Can't run with embedded, config has no mysqld";
my %no_copy = map { $_ => 1 }
@@ -372,7 +372,7 @@ sub resolve_at_variable {
}
$res .= $after;
- $config->insert($group->name(), $option->name(), $res)
+ $option->{value}= $res;
}
@@ -457,7 +457,7 @@ sub new_config {
}
$self->run_section_rules($config,
- 'mysqld.',
+ 'mysqld\.',
@mysqld_rules);
# [mysqlbinlog] need additional settings