Test and fix very small --chunk-time. Report immediately when a slave is stopped. Add short form -q for --quiet. Report very slow checksums once for each table. Use Cxn::name() instead of Cxn::dsn()->{n}; remove n from DSNParser; make cxn's name @@hostname by default, else stringified DSN parts.

This commit is contained in:
Daniel Nichter
2011-10-19 11:27:19 -06:00
parent 005436716f
commit c4db7c0633
14 changed files with 275 additions and 64 deletions

View File

@@ -467,12 +467,17 @@ sub no_diff {
die "I need a cmd argument" unless $cmd;
die "I need an expected_output argument" unless $expected_output;
die "$expected_output does not exist" unless -f "$trunk/$expected_output";
$expected_output = "$trunk/$expected_output";
die "$expected_output does not exist" unless -f $expected_output;
my $tmp_file = '/tmp/percona-toolkit-test-output.txt';
my $tmp_file_orig = '/tmp/percona-toolkit-test-output-original.txt';
if ( my $sed_args = $args{sed_out} ) {
`cat $expected_output | sed $sed_args > /tmp/pt-test-outfile-trf`;
$expected_output = "/tmp/pt-test-outfile-trf";
}
# Determine cmd type and run it.
if ( ref $cmd eq 'CODE' ) {
output($cmd, file => $tmp_file);
@@ -522,7 +527,7 @@ sub no_diff {
}
# Remove our tmp files.
`rm -f $tmp_file $tmp_file_orig`
`rm -f $tmp_file $tmp_file_orig /tmp/pt-test-outfile-trf >/dev/null 2>&1`
unless $ENV{KEEP_OUTPUT} || $args{keep_output};
return !$retval;