1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

overlay support for mysql-test-run and mysqltest

mysql-test-run auto-disables all optional plugins.


mysql-test/include/default_client.cnf:
  no @OPT.plugindir anymore
mysql-test/include/default_mysqld.cnf:
  don't disable plugins manually - mtr can do it better
mysql-test/suite/innodb/t/innodb_bug47167.test:
  mtr now uses suite-dir as an include path
mysql-test/suite/innodb/t/innodb_file_format.test:
  mtr now uses suite-dir as an include path
mysql-test/t/partition_binlog.test:
  this test uses partitions
storage/example/mysql-test/mtr/t/source.result:
  update results. as mysqltest includes the correct overlayed include
storage/innobase/handler/ha_innodb.cc:
  the assert is wrong
This commit is contained in:
Sergei Golubchik
2012-02-23 07:50:11 +01:00
parent ae0a7cfd5f
commit c39877071a
98 changed files with 1264 additions and 531 deletions

View File

@ -31,8 +31,19 @@ use File::Basename;
#
# Rules to run first of all
#
sub add_opt_values {
my ($self, $config)= @_;
# add auto-options
$config->insert('OPT', 'port' => sub { fix_port($self, $config) });
$config->insert('OPT', 'vardir' => sub { $self->{ARGS}->{vardir} });
$config->insert('mysqld', "loose-skip-$_" => undef) for (@::optional_plugins);
}
my @pre_rules=
(
\&add_opt_values,
);
@ -230,9 +241,10 @@ my @mysqld_rules=
{ 'port' => \&fix_port },
{ 'socket' => \&fix_socket },
{ '#log-error' => \&fix_log_error },
{ 'general-log' => sub { return 1; } },
{ 'general-log' => 1 },
{ 'plugin-dir' => sub { $::plugindir } },
{ 'general-log-file' => \&fix_log },
{ 'slow-query-log' => sub { return 1; } },
{ 'slow-query-log' => 1 },
{ 'slow-query-log-file' => \&fix_log_slow_queries },
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
@ -432,7 +444,7 @@ sub post_check_embedded_group {
my $first_mysqld= $config->first_like('mysqld.') or
croak "Can't run with embedded, config has no mysqld";
my @no_copy =
my %no_copy = map { $_ => 1 }
(
'#log-error', # Embedded server writes stderr to mysqltest's log file
'slave-net-timeout', # Embedded server are not build with replication
@ -441,7 +453,7 @@ sub post_check_embedded_group {
foreach my $option ( $mysqld->options(), $first_mysqld->options() ) {
# Don't copy options whose name is in "no_copy" list
next if grep ( $option->name() eq $_, @no_copy);
next if $no_copy{$option->name()};
$config->insert('embedded', $option->name(), $option->value())
}
@ -632,19 +644,11 @@ sub new_config {
testname => $args->{testname},
}, $class;
# add auto-options
$config->insert('OPT', 'port' => sub { fix_port($self, $config) });
$config->insert('OPT', 'vardir' => sub { $self->{ARGS}->{vardir} });
$config->insert('OPT', 'plugindir' => sub { $::plugindir });
{
# Run pre rules
foreach my $rule ( @pre_rules ) {
&$rule($self, $config);
}
# Run pre rules
foreach my $rule ( @pre_rules ) {
&$rule($self, $config);
}
$self->run_section_rules($config,
'cluster_config\.\w*$',
@cluster_config_rules);