Commit 7c9d0abb authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

Merge neptunus.(none):/home/msvensson/mysql/work/my41-work

into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
parents ac2ef7dd 961ae4ab
...@@ -2973,26 +2973,15 @@ sub do_before_run_mysqltest($) ...@@ -2973,26 +2973,15 @@ sub do_before_run_mysqltest($)
unlink("$result_dir/$tname.log"); unlink("$result_dir/$tname.log");
unlink("$result_dir/$tname.warnings"); unlink("$result_dir/$tname.warnings");
mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are
# output current test to ndbcluster log file to enable diagnostics
mtr_tofile($path_ndb_testrun_log,"CURRENT TEST $tname\n");
mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
if ( $master->[1]->{'pid'} )
{
mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
}
if ( $mysql_version_id < 50000 ) if ( $mysql_version_id < 50000 )
{ {
# Set envirnoment variable NDB_STATUS_OK to 1 # Set environment variable NDB_STATUS_OK to 1
# if script decided to run mysqltest cluster _is_ installed ok # if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "1"; $ENV{'NDB_STATUS_OK'} = "1";
} }
elsif ( $mysql_version_id < 50100 ) elsif ( $mysql_version_id < 50100 )
{ {
# Set envirnoment variable NDB_STATUS_OK to YES # Set environment variable NDB_STATUS_OK to YES
# if script decided to run mysqltest cluster _is_ installed ok # if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "YES"; $ENV{'NDB_STATUS_OK'} = "YES";
} }
...@@ -3003,9 +2992,9 @@ sub do_after_run_mysqltest($) ...@@ -3003,9 +2992,9 @@ sub do_after_run_mysqltest($)
my $tinfo= shift; my $tinfo= shift;
my $tname= $tinfo->{'name'}; my $tname= $tinfo->{'name'};
mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
# Save info from this testcase run to mysqltest.log # Save info from this testcase run to mysqltest.log
mtr_appendfile_to_file($path_current_test_log, $path_mysqltest_log)
if -f $path_current_test_log;
mtr_appendfile_to_file($path_timefile, $path_mysqltest_log) mtr_appendfile_to_file($path_timefile, $path_mysqltest_log)
if -f $path_timefile; if -f $path_timefile;
...@@ -3015,6 +3004,26 @@ sub do_after_run_mysqltest($) ...@@ -3015,6 +3004,26 @@ sub do_after_run_mysqltest($)
} }
sub run_testcase_mark_logs($)
{
my ($log_msg)= @_;
# Write a marker to all log files
# The file indicating current test name
mtr_tonewfile($path_current_test_log, $log_msg);
# each mysqld's .err file
foreach my $mysqld (@{$master}, @{$slave})
{
mtr_tofile($mysqld->{path_myerr}, $log_msg);
}
# ndbcluster log file
mtr_tofile($path_ndb_testrun_log, $log_msg);
}
sub find_testcase_skipped_reason($) sub find_testcase_skipped_reason($)
{ {
my ($tinfo)= @_; my ($tinfo)= @_;
...@@ -3134,6 +3143,10 @@ sub run_testcase ($) { ...@@ -3134,6 +3143,10 @@ sub run_testcase ($) {
run_testcase_stop_servers($tinfo, $master_restart, $slave_restart); run_testcase_stop_servers($tinfo, $master_restart, $slave_restart);
} }
# Write to all log files to indicate start of testcase
run_testcase_mark_logs("CURRENT_TEST: $tinfo->{name}\n");
my $died= mtr_record_dead_children(); my $died= mtr_record_dead_children();
if ($died or $master_restart or $slave_restart) if ($died or $master_restart or $slave_restart)
{ {
...@@ -3475,6 +3488,12 @@ sub mysqld_arguments ($$$$$) { ...@@ -3475,6 +3488,12 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix); mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
} }
} }
if ( $mysql_version_id <= 50106 )
{
# Force mysqld to use log files up until 5.1.6
mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
}
} }
if ( $type eq 'slave' ) if ( $type eq 'slave' )
...@@ -3492,8 +3511,6 @@ sub mysqld_arguments ($$$$$) { ...@@ -3492,8 +3511,6 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--log-slave-updates", $prefix); mtr_add_arg($args, "%s--log-slave-updates", $prefix);
} }
mtr_add_arg($args, "%s--log=%s", $prefix,
$slave->[$idx]->{'path_mylog'});
mtr_add_arg($args, "%s--master-retry-count=10", $prefix); mtr_add_arg($args, "%s--master-retry-count=10", $prefix);
mtr_add_arg($args, "%s--pid-file=%s", $prefix, mtr_add_arg($args, "%s--pid-file=%s", $prefix,
$slave->[$idx]->{'path_pid'}); $slave->[$idx]->{'path_pid'});
...@@ -3554,6 +3571,13 @@ sub mysqld_arguments ($$$$$) { ...@@ -3554,6 +3571,13 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix); mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
} }
} }
if ( $mysql_version_id <= 50106 )
{
# Force mysqld to use log files up until 5.1.6
mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
}
} # end slave } # end slave
if ( $opt_debug ) if ( $opt_debug )
...@@ -3630,7 +3654,6 @@ sub mysqld_arguments ($$$$$) { ...@@ -3630,7 +3654,6 @@ sub mysqld_arguments ($$$$$) {
elsif ( $type eq 'master' ) elsif ( $type eq 'master' )
{ {
mtr_add_arg($args, "%s--open-files-limit=1024", $prefix); mtr_add_arg($args, "%s--open-files-limit=1024", $prefix);
mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
} }
return $args; return $args;
...@@ -4135,8 +4158,6 @@ sub run_testcase_start_servers($) { ...@@ -4135,8 +4158,6 @@ sub run_testcase_start_servers($) {
return 1; return 1;
} }
} }
mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
mysqld_start($master->[1],$tinfo->{'master_opt'},[]); mysqld_start($master->[1],$tinfo->{'master_opt'},[]);
} }
...@@ -4164,8 +4185,6 @@ sub run_testcase_start_servers($) { ...@@ -4164,8 +4185,6 @@ sub run_testcase_start_servers($) {
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
if ( $tinfo->{'slave_num'} ) if ( $tinfo->{'slave_num'} )
{ {
mtr_tofile($slave->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
restore_slave_databases($tinfo->{'slave_num'}); restore_slave_databases($tinfo->{'slave_num'});
do_before_start_slave($tinfo); do_before_start_slave($tinfo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment