mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
Fixed that test suite doesn't remove duplicate options
- multiple usage of plugin-load-add and optimizer-switch are now included in generated config files
This commit is contained in:
@ -21,6 +21,17 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Carp;
|
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 {
|
sub new {
|
||||||
my ($class, $option_name, $option_value)= @_;
|
my ($class, $option_name, $option_value)= @_;
|
||||||
my $self= bless { name => $option_name,
|
my $self= bless { name => $option_name,
|
||||||
@ -327,7 +338,6 @@ sub new {
|
|||||||
# Skip comment
|
# Skip comment
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
croak "Unexpected line '$line' found in '$path'";
|
croak "Unexpected line '$line' found in '$path'";
|
||||||
}
|
}
|
||||||
@ -355,6 +365,11 @@ sub insert {
|
|||||||
|
|
||||||
if ( defined $option ) {
|
if ( defined $option ) {
|
||||||
#print "option: $option, value: $value\n";
|
#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
|
# Add the option to the group
|
||||||
$group->insert($option, $value, $if_not_exist);
|
$group->insert($option, $value, $if_not_exist);
|
||||||
|
Reference in New Issue
Block a user