From 345c18e4e18c27eb387c6cec2e252c8b91bfc302 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Aug 2007 15:32:13 +0200 Subject: Move "analyze_testcase_failure" to mysqltest(since it knows best when to perform this analyzis) client/mysqltest.c: Add function 'show_query' and use it to output some debug queries when "sync_with_master" has failed. mysql-test/mysql-test-run.pl: Move "analyze_testcase_failure" to mysqltest --- mysql-test/mysql-test-run.pl | 54 -------------------------------------------- 1 file changed, 54 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 269bfbcb40f..48a85f020ae 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3361,56 +3361,6 @@ sub find_testcase_skipped_reason($) } -sub analyze_testcase_failure_sync_with_master($) -{ - my ($tinfo)= @_; - - my $args; - mtr_init_args(\$args); - - mtr_add_arg($args, "--no-defaults"); - mtr_add_arg($args, "--silent"); - mtr_add_arg($args, "--skip-safemalloc"); - mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir); - mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir); - - mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_sock'}); - mtr_add_arg($args, "--port=%d", $master->[0]->{'port'}); - mtr_add_arg($args, "--database=test"); - mtr_add_arg($args, "--user=%s", $opt_user); - mtr_add_arg($args, "--password="); - - # Run the test file and append output to log file - mtr_run_test($exe_mysqltest,$args, - "include/analyze_failure_sync_with_master.test", - "$path_timefile", "$path_timefile","", - { append_log_file => 1 }); - -} - -sub analyze_testcase_failure($) -{ - my ($tinfo)= @_; - - # Open mysqltest.log - my $F= IO::File->new($path_timefile) - or return; - - while ( my $line= <$F> ) - { - # Look for "mysqltest: At line nnn: - if ( $line =~ /mysqltest: At line [0-9]*: (.*)/ ) - { - my $error= $1; - # Look for "could not sync with master" - if ( $error =~ /could not sync with master/ ) - { - analyze_testcase_failure_sync_with_master($tinfo); - } - } - } -} - ############################################################################## # # Run a single test case @@ -3503,10 +3453,6 @@ sub run_testcase ($) { } elsif ( $res == 1 ) { - if ( $opt_force ) - { - analyze_testcase_failure($tinfo); - } # Test case failure reported by mysqltest report_failure_and_restart($tinfo); } -- cgit v1.2.1