mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-16 08:17:20 +00:00
Merge right-sth-bug-1039184
This commit is contained in:
@@ -364,6 +364,12 @@ sub _compare_rows {
|
||||
|
||||
$event->{row_count} = 0;
|
||||
|
||||
if ( !$right ) {
|
||||
PTDEBUG && _d('No results sth on host', $i);
|
||||
delete $event->{results_sth};
|
||||
next EVENT;
|
||||
}
|
||||
|
||||
# Identical rows are ignored. Once a difference on either side is found,
|
||||
# we gobble the remaining rows in that sth and print them to an outfile.
|
||||
# This short circuits RowDiff::compare_sets() which is what we want to do.
|
||||
|
@@ -256,7 +256,7 @@ sub get_report {
|
||||
if ( $self->{underline_header} ) {
|
||||
my @underlines = map { '=' x $_->{print_width} } @{$self->{cols}};
|
||||
push @lines, $self->_truncate_line(
|
||||
sprintf($fmt, @underlines),
|
||||
sprintf($fmt, map { $_ || '' } @underlines),
|
||||
mark => '',
|
||||
);
|
||||
}
|
||||
@@ -265,7 +265,10 @@ sub get_report {
|
||||
my $vals = $_;
|
||||
my $i = 0;
|
||||
my @vals = map {
|
||||
defined $_ ? $_ : $self->{cols}->[$i++]->{undef_value}
|
||||
my $val = defined $_ ? $_ : $self->{cols}->[$i++]->{undef_value};
|
||||
$val = '' if !defined $val;
|
||||
$val =~ s/\n/ /g;
|
||||
$val;
|
||||
} @$vals;
|
||||
my $line = sprintf($fmt, @vals);
|
||||
if ( $self->{extend_right} ) {
|
||||
|
@@ -64,7 +64,7 @@ sub event_report {
|
||||
my $line = sprintf(
|
||||
'# Query %d: ID 0x%s at byte %d ',
|
||||
$rank || 0,
|
||||
make_checksum($where),
|
||||
make_checksum($where) || '0x0',
|
||||
0, # $sample->{pos_in_log} || 0
|
||||
);
|
||||
$line .= ('_' x (LINE_LENGTH - length($line)));
|
||||
@@ -89,7 +89,7 @@ sub event_report {
|
||||
my @diffs = grep { $_ =~ m/^different_/ } keys %$class;
|
||||
foreach my $diff ( sort @diffs ) {
|
||||
push @result,
|
||||
sprintf $fmt, ' ' . make_label($diff), $class->{$diff}->{sum};
|
||||
sprintf $fmt, ' ' . (make_label($diff) || ''), ($class->{$diff}->{sum} || 0);
|
||||
}
|
||||
|
||||
# Side-by-side hosts report.
|
||||
|
Reference in New Issue
Block a user