2991 Bjorn Munch 2010-11-24 [merge]
upmerge 58424 and 43418 follow-up
modified:
mysql-test/mysql-test-run.pl
2990 Bjorn Munch 2010-11-24
Bug #58171 server_uuid_embedded fails sporadically
Fixed if condition to explicitly test for empty string as it used to
modified:
mysql-test/t/server_uuid_embedded.test
2989 Bjorn Munch 2010-11-18 [merge]
upmerge 58257
modified:
client/mysqltest.cc
mysql-test/r/mysqltest.result
mysql-test/t/mysqltest.test
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2010-11-18 15:57:46 +0000
+++ b/mysql-test/mysql-test-run.pl 2010-11-24 20:25:43 +0000
@@ -608,7 +608,10 @@ sub run_test_server ($$$) {
if ( !$opt_force ) {
# Test has failed, force is off
push(@$completed, $result);
- return $completed;
+ return $completed unless $result->{'dont_kill_server'};
+ # Prevent kill of server, to get valgrind report
+ print $sock "BYE\n";
+ next;
}
elsif ($opt_max_test_fail > 0 and
$num_failed_test >= $opt_max_test_fail) {
@@ -855,15 +858,16 @@ sub run_worker ($) {
mtr_report("Server said BYE");
stop_all_servers($opt_shutdown_timeout);
mark_time_used('restart');
+ my $valgrind_reports= 0;
if ($opt_valgrind_mysqld) {
- valgrind_exit_reports();
+ $valgrind_reports= valgrind_exit_reports();
}
if ( $opt_gprof ) {
gprof_collect (find_mysqld($basedir), keys %gprof_dirs);
}
mark_time_used('init');
print_times_used($server, $thread_num);
- exit(0);
+ exit($valgrind_reports);
}
else {
mtr_error("Could not understand server, '$line'");
@@ -3848,7 +3852,6 @@ sub run_testcase ($) {
# ----------------------------------------------------
# Check if it was an expected crash
# ----------------------------------------------------
- SRVDIED:
my $check_crash = check_expected_crash_and_restart($proc);
if ($check_crash)
{
@@ -3858,6 +3861,7 @@ sub run_testcase ($) {
next;
}
+ SRVDIED:
# ----------------------------------------------------
# Stop the test case timer
# ----------------------------------------------------
@@ -4388,7 +4392,12 @@ sub after_failure ($) {
sub report_failure_and_restart ($) {
my $tinfo= shift;
- stop_all_servers();
+ if ($opt_valgrind_mysqld && ($tinfo->{'warnings'} || $tinfo->{'timeout'})) {
+ # In these cases we may want valgrind report from normal termination
+ $tinfo->{'dont_kill_server'}= 1;
+ }
+ # Shotdown properly if not to be killed (for valgrind)
+ stop_all_servers($tinfo->{'dont_kill_server'} ? $opt_shutdown_timeout : 0);
$tinfo->{'result'}= 'MTR_RES_FAILED';
@@ -5556,6 +5565,8 @@ sub valgrind_arguments {
#
sub valgrind_exit_reports() {
+ my $found_err= 0;
+
foreach my $log_file (keys %mysqld_logs)
{
my @culprits= ();
@@ -5591,7 +5602,7 @@ sub valgrind_exit_reports() {
next;
}
# This line marks the start of a valgrind report
- $found_report= 1 if $line =~ /ERROR SUMMARY:/;
+ $found_report= 1 if $line =~ /^==\d+== .* SUMMARY:/;
if ($found_report) {
$line=~ s/^==\d+== //;
@@ -5608,8 +5619,11 @@ sub valgrind_exit_reports() {
mtr_print ("Valgrind report from $log_file after tests:\n", @culprits);
mtr_print_line();
print ("$valgrind_rep\n");
+ $found_err= 1;
}
}
+
+ return $found_err;
}
#
=== modified file 'mysql-test/t/server_uuid_embedded.test'
--- a/mysql-test/t/server_uuid_embedded.test 2010-10-21 12:36:16 +0000
+++ b/mysql-test/t/server_uuid_embedded.test 2010-11-24 13:30:12 +0000
@@ -25,7 +25,8 @@ SET GLOBAL SERVER_UUID= UUID();
--echo # SERVER_UUID is not null
--echo -----------------------------------------------------------------------------
--let $server_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1)
-if (!$server_uuid)
+# Cannot use !$server_uuid since it may begin with 0
+if ($server_uuid == '')
{
--echo server's UUID is null
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-mtr branch (bjorn.munch:2989 to 2991) | Bjorn Munch | 24 Nov |