summaryrefslogtreecommitdiff
path: root/mysql-test/lib/My
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib/My')
-rw-r--r--mysql-test/lib/My/ConfigFactory.pm13
-rw-r--r--mysql-test/lib/My/Find.pm2
-rw-r--r--mysql-test/lib/My/SafeProcess.pm5
3 files changed, 12 insertions, 8 deletions
diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm
index 8df4fa53cc7..87741e7bf82 100644
--- a/mysql-test/lib/My/ConfigFactory.pm
+++ b/mysql-test/lib/My/ConfigFactory.pm
@@ -174,7 +174,6 @@ sub fix_secure_file_priv {
sub fix_std_data {
my ($self, $config, $group_name, $group)= @_;
- #return "$::opt_vardir/std_data";
my $testdir= $self->get_testdir($group);
return "$testdir/std_data";
}
@@ -230,6 +229,7 @@ my @mysqld_rules=
(
{ 'basedir' => sub { return shift->{ARGS}->{basedir}; } },
{ 'tmpdir' => \&fix_tmpdir },
+ { 'log-basename' => sub { return "mysqld" } },
{ 'character-sets-dir' => \&fix_charset_dir },
{ 'lc-messages-dir' => \&fix_language },
{ 'datadir' => \&fix_datadir },
@@ -237,6 +237,7 @@ my @mysqld_rules=
{ '#host' => \&fix_host },
{ 'port' => \&fix_port },
{ 'socket' => \&fix_socket },
+ { 'log-error' => \&fix_log_error },
{ '#log-error' => \&fix_log_error },
{ 'general-log' => sub { return 1; } },
{ 'general-log-file' => \&fix_log },
@@ -245,6 +246,7 @@ my @mysqld_rules=
{ '#user' => sub { return shift->{ARGS}->{user} || ""; } },
{ '#password' => sub { return shift->{ARGS}->{password} || ""; } },
{ 'server-id' => \&fix_server_id, },
+ { 'sync-sys' => sub { return 1; } },
# By default, prevent the started mysqld to access files outside of vardir
{ 'secure-file-priv' => sub { return shift->{ARGS}->{vardir}; } },
{ 'ssl-ca' => \&fix_ssl_ca },
@@ -383,7 +385,7 @@ sub post_check_client_group {
if (! defined $option){
#print $config;
- croak "Could not get value for '$name_from'";
+ croak "Could not get value for '$name_from' for test $self->{testname}";
}
$config->insert($client_group_name, $name_to, $option->value())
}
@@ -469,9 +471,9 @@ sub resolve_at_variable {
$after = $';
chop($group_name);
- my $from_group= $config->group($group_name)
- or croak "There is no group named '$group_name' that ",
- "can be used to resolve '$option_name'";
+ my $from_group= $config->group($group_name)
+ or croak "There is no group named '$group_name' that ",
+ "can be used to resolve '$option_name' for test '$self->{testname}'";
my $value= $from_group->value($option_name);
$res .= $before.$value;
@@ -639,6 +641,7 @@ sub new_config {
ARGS => $args,
PORT => $args->{baseport},
SERVER_ID => 1,
+ testname => $args->{testname},
}, $class;
# add auto-options
diff --git a/mysql-test/lib/My/Find.pm b/mysql-test/lib/My/Find.pm
index 9d1d2915012..ec937eb90b4 100644
--- a/mysql-test/lib/My/Find.pm
+++ b/mysql-test/lib/My/Find.pm
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2011, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm
index bd2ded81018..1f00065fae2 100644
--- a/mysql-test/lib/My/SafeProcess.pm
+++ b/mysql-test/lib/My/SafeProcess.pm
@@ -1,5 +1,6 @@
# -*- cperl -*-
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2011, Oracle and/or its affiliates.
+# Copyright (c) 2009, 2011 Monty Program Ab
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -86,6 +87,7 @@ sub is_child {
my @safe_process_cmd;
my $safe_kill;
my $bindir;
+
if(defined $ENV{MTR_BINDIR})
{
# This is an out-of-source build. Build directory
@@ -98,7 +100,6 @@ else
$bindir = getcwd();
}
-
# Find the safe process binary or script
sub find_bin {
if (IS_WIN32PERL or IS_CYGWIN)