diff options
Diffstat (limited to 'mysql-test/lib/My')
-rw-r--r-- | mysql-test/lib/My/Config.pm | 2 | ||||
-rw-r--r-- | mysql-test/lib/My/ConfigFactory.pm | 12 | ||||
-rw-r--r-- | mysql-test/lib/My/CoreDump.pm | 14 | ||||
-rw-r--r-- | mysql-test/lib/My/SafeProcess.pm | 4 |
4 files changed, 25 insertions, 7 deletions
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm index 1d8d1617fce..a343a0ef688 100644 --- a/mysql-test/lib/My/Config.pm +++ b/mysql-test/lib/My/Config.pm @@ -47,7 +47,7 @@ sub option { my $value= $self->{value}; my $opt= $name; - $opt= "$name=$value" if ($value); + $opt= "$name=$value" if (defined $value); $opt= "--$opt" unless ($opt =~ /^--/); return $opt; } diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index e79d97e045e..b8ce038f23e 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -37,7 +37,7 @@ sub add_opt_values { # add auto-options $config->insert('OPT', 'port' => sub { fix_port($self, $config) }); - $config->insert('mysqld', "loose-skip-$_" => undef) for (@::optional_plugins); + $config->insert('mysqld', "loose-skip-plugin-$_" => undef) for (@::optional_plugins); } my @pre_rules= @@ -169,6 +169,13 @@ sub fix_log { return "$dir/mysqld.log"; } +sub fix_bind_address { + if (IS_WINDOWS) { + return "*"; + } else { + return "127.0.0.1"; + } +} sub fix_log_slow_queries { my ($self, $config, $group_name, $group)= @_; my $dir= dirname($group->value('datadir')); @@ -251,6 +258,7 @@ my @mysqld_rules= { 'ssl-ca' => \&fix_ssl_ca }, { 'ssl-cert' => \&fix_ssl_server_cert }, { 'ssl-key' => \&fix_ssl_server_key }, + { 'bind-address' => \&fix_bind_address }, ); if (IS_WINDOWS) @@ -325,6 +333,7 @@ my @cluster_config_rules= # my @client_rules= ( + { 'character-sets-dir' => \&fix_charset_dir }, ); @@ -347,7 +356,6 @@ my @mysqltest_rules= # my @mysqlbinlog_rules= ( - { 'character-sets-dir' => \&fix_charset_dir }, ); diff --git a/mysql-test/lib/My/CoreDump.pm b/mysql-test/lib/My/CoreDump.pm index f9f7b3d8d4b..a421d51ec98 100644 --- a/mysql-test/lib/My/CoreDump.pm +++ b/mysql-test/lib/My/CoreDump.pm @@ -53,9 +53,19 @@ sub _verify_binpath { sub _gdb { my ($core_name)= @_; - print "\nTrying 'gdb' to get a backtrace\n"; + # Check that gdb exists + `gdb --version`; + if ($?) { + print "gdb not found, cannot get the stack trace\n"; + return; + } - return unless -f $core_name; + if (-f $core_name) { + print "\nTrying 'gdb' to get a backtrace from coredump $core_name\n"; + } else { + print "\nCoredump $core_name does not exist, cannot run 'gdb'\n"; + return; + } # Find out name of binary that generated core `gdb -c '$core_name' --batch 2>&1` =~ diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index 7059ceebdad..2980992290c 100644 --- a/mysql-test/lib/My/SafeProcess.pm +++ b/mysql-test/lib/My/SafeProcess.pm @@ -34,7 +34,7 @@ package My::SafeProcess; # will zap the "monitored process" and exit # - the "monitored process" to exit, in which case it will exit # itself with same exit code as the "monitored process" -# - the parent process to send the "shutdown" signal in wich case +# - the parent process to send the "shutdown" signal in which case # monitor will kill the "monitored process" hard and exit # # @@ -338,7 +338,7 @@ sub dump_core { my ($self)= @_; return if IS_WINDOWS; my $pid= $self->{SAFE_PID}; - die "Can't cet core from not started process" unless defined $pid; + die "Can't get core from not started process" unless defined $pid; _verbose("Sending ABRT to $self"); kill ("ABRT", $pid); return 1; |