mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
Merge pt-upgrade-hostname-bug-980318-summary.
This commit is contained in:
@@ -9498,8 +9498,10 @@ sub report {
|
||||
my $query_id_col = {
|
||||
name => 'Query ID',
|
||||
};
|
||||
my $hostno = 0;
|
||||
my @host_cols = map {
|
||||
my $col = { name => $_->{name} };
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno" };
|
||||
$col;
|
||||
} @$hosts;
|
||||
|
||||
@@ -9595,12 +9597,14 @@ sub _report_diff_row_counts {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Row count differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
);
|
||||
|
||||
my $diff_row_counts = $self->{diffs}->{row_counts};
|
||||
@@ -9836,8 +9840,10 @@ sub report {
|
||||
my $query_id_col = {
|
||||
name => 'Query ID',
|
||||
};
|
||||
my $hostno = 0;
|
||||
my @host_cols = map {
|
||||
my $col = { name => $_->{name} };
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno" };
|
||||
$col;
|
||||
} @$hosts;
|
||||
|
||||
@@ -9867,12 +9873,14 @@ sub _report_diff_big {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Big query time differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
{ name => 'Difference', right_justify => 1 },
|
||||
);
|
||||
|
||||
@@ -9902,12 +9910,14 @@ sub _report_diff_in_bucket {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Significant query time differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
{ name => '%Increase', right_justify => 1 },
|
||||
{ name => '%Threshold', right_justify => 1 },
|
||||
);
|
||||
@@ -10186,8 +10196,10 @@ sub report {
|
||||
my $query_id_col = {
|
||||
name => 'Query ID',
|
||||
};
|
||||
my $hostno = 0;
|
||||
my @host_cols = map {
|
||||
my $col = { name => $_->{name} };
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno" };
|
||||
$col;
|
||||
} @$hosts;
|
||||
|
||||
@@ -10230,7 +10242,7 @@ sub _report_diff_warnings {
|
||||
my ($hostno, $code, $message) = @{$diff_warnings->{$item}->{$_}};
|
||||
$report->add_line(
|
||||
$get_id->($item) . '-' . $_,
|
||||
$args{hosts}->[$hostno]->{name}, $code, $message,
|
||||
"host" . ($hostno + 1), $code, $message,
|
||||
);
|
||||
} sort { $a <=> $b } keys %{$diff_warnings->{$item}};
|
||||
}
|
||||
@@ -10251,13 +10263,15 @@ sub _report_diff_levels {
|
||||
|
||||
my $report = new ReportFormatter(extend_right => 1);
|
||||
$report->set_title('Warning level differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
{ name => 'Code', right_justify => 1 },
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
{ name => 'Message' },
|
||||
);
|
||||
|
||||
@@ -10287,12 +10301,14 @@ sub _report_diff_warning_counts {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Warning count differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
);
|
||||
|
||||
my $diff_warning_counts = $self->{diffs}->{warning_counts};
|
||||
|
@@ -254,8 +254,10 @@ sub report {
|
||||
my $query_id_col = {
|
||||
name => 'Query ID',
|
||||
};
|
||||
my $hostno = 0;
|
||||
my @host_cols = map {
|
||||
my $col = { name => $_->{name} };
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno" };
|
||||
$col;
|
||||
} @$hosts;
|
||||
|
||||
@@ -297,12 +299,14 @@ sub _report_diff_big {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Big query time differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
{ name => 'Difference', right_justify => 1 },
|
||||
);
|
||||
|
||||
@@ -344,12 +348,14 @@ sub _report_diff_in_bucket {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Significant query time differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
{ name => '%Increase', right_justify => 1 },
|
||||
{ name => '%Threshold', right_justify => 1 },
|
||||
);
|
||||
|
@@ -836,8 +836,10 @@ sub report {
|
||||
my $query_id_col = {
|
||||
name => 'Query ID',
|
||||
};
|
||||
my $hostno = 0;
|
||||
my @host_cols = map {
|
||||
my $col = { name => $_->{name} };
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno" };
|
||||
$col;
|
||||
} @$hosts;
|
||||
|
||||
@@ -933,12 +935,14 @@ sub _report_diff_row_counts {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Row count differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
);
|
||||
|
||||
my $diff_row_counts = $self->{diffs}->{row_counts};
|
||||
|
@@ -292,8 +292,10 @@ sub report {
|
||||
my $query_id_col = {
|
||||
name => 'Query ID',
|
||||
};
|
||||
my $hostno = 0;
|
||||
my @host_cols = map {
|
||||
my $col = { name => $_->{name} };
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno" };
|
||||
$col;
|
||||
} @$hosts;
|
||||
|
||||
@@ -336,7 +338,7 @@ sub _report_diff_warnings {
|
||||
my ($hostno, $code, $message) = @{$diff_warnings->{$item}->{$_}};
|
||||
$report->add_line(
|
||||
$get_id->($item) . '-' . $_,
|
||||
$args{hosts}->[$hostno]->{name}, $code, $message,
|
||||
"host" . ($hostno + 1), $code, $message,
|
||||
);
|
||||
} sort { $a <=> $b } keys %{$diff_warnings->{$item}};
|
||||
}
|
||||
@@ -357,13 +359,15 @@ sub _report_diff_levels {
|
||||
|
||||
my $report = new ReportFormatter(extend_right => 1);
|
||||
$report->set_title('Warning level differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
{ name => 'Code', right_justify => 1 },
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
{ name => 'Message' },
|
||||
);
|
||||
|
||||
@@ -393,12 +397,14 @@ sub _report_diff_warning_counts {
|
||||
|
||||
my $report = new ReportFormatter();
|
||||
$report->set_title('Warning count differences');
|
||||
my $hostno = 0;
|
||||
$report->set_columns(
|
||||
$args{query_id_col},
|
||||
map {
|
||||
my $col = { name => $_->{name}, right_justify => 1 };
|
||||
(map {
|
||||
$hostno++;
|
||||
my $col = { name => "host$hostno", right_justify => 1 };
|
||||
$col;
|
||||
} @{$args{hosts}},
|
||||
} @{$args{hosts}}),
|
||||
);
|
||||
|
||||
my $diff_warning_counts = $self->{diffs}->{warning_counts};
|
||||
|
@@ -150,9 +150,9 @@ compare(0.000100, 0.000250);
|
||||
|
||||
$report = <<EOF;
|
||||
# Significant query time differences
|
||||
# Query ID server1 server2 %Increase %Threshold
|
||||
# ================== ======= ======= ========= ==========
|
||||
# EDEF654FCCC4A4D8-0 100us 250us 150.00 100
|
||||
# Query ID host1 host2 %Increase %Threshold
|
||||
# ================== ===== ===== ========= ==========
|
||||
# EDEF654FCCC4A4D8-0 100us 250us 150.00 100
|
||||
EOF
|
||||
|
||||
is(
|
||||
@@ -166,9 +166,9 @@ compare(0.000100, 1.100251);
|
||||
|
||||
$report = <<EOF;
|
||||
# Big query time differences
|
||||
# Query ID server1 server2 Difference
|
||||
# ================== ======= ======= ==========
|
||||
# EDEF654FCCC4A4D8-0 100us 1s 1s
|
||||
# Query ID host1 host2 Difference
|
||||
# ================== ===== ===== ==========
|
||||
# EDEF654FCCC4A4D8-0 100us 1s 1s
|
||||
EOF
|
||||
|
||||
is(
|
||||
|
@@ -279,14 +279,14 @@ is_deeply(
|
||||
|
||||
$report = <<EOF;
|
||||
# Checksum differences
|
||||
# Query ID master slave
|
||||
# Query ID host1 host2
|
||||
# ================== ========= ==========
|
||||
# D2D386B840D3BEEA-1 $events[0]->{checksum} $events[1]->{checksum}
|
||||
|
||||
# Row count differences
|
||||
# Query ID master slave
|
||||
# ================== ====== =====
|
||||
# D2D386B840D3BEEA-1 3 4
|
||||
# Query ID host1 host2
|
||||
# ================== ===== =====
|
||||
# D2D386B840D3BEEA-1 3 4
|
||||
EOF
|
||||
|
||||
is(
|
||||
@@ -488,14 +488,14 @@ is_deeply(
|
||||
|
||||
$report = <<EOF;
|
||||
# Column value differences
|
||||
# Query ID Column master slave
|
||||
# ================== ====== ====== ===========
|
||||
# CFC309761E9131C5-3 c c should be c
|
||||
# Query ID Column host1 host2
|
||||
# ================== ====== ===== ===========
|
||||
# CFC309761E9131C5-3 c c should be c
|
||||
|
||||
# Row count differences
|
||||
# Query ID master slave
|
||||
# ================== ====== =====
|
||||
# B8B721D77EA1FD78-0 3 4
|
||||
# Query ID host1 host2
|
||||
# ================== ===== =====
|
||||
# B8B721D77EA1FD78-0 3 4
|
||||
EOF
|
||||
|
||||
is(
|
||||
@@ -552,9 +552,9 @@ is_deeply(
|
||||
|
||||
$report = <<EOF;
|
||||
# Column value differences
|
||||
# Query ID Column master slave
|
||||
# ================== ====== ====== ===========
|
||||
# CFC309761E9131C5-3 c a should be a
|
||||
# Query ID Column host1 host2
|
||||
# ================== ====== ===== ===========
|
||||
# CFC309761E9131C5-3 c a should be a
|
||||
EOF
|
||||
|
||||
is(
|
||||
@@ -674,9 +674,9 @@ is_deeply(
|
||||
|
||||
$report = <<EOF;
|
||||
# Row count differences
|
||||
# Query ID master slave
|
||||
# ================== ====== =====
|
||||
# D56E6FABA26D1F1C-3 3 1
|
||||
# Query ID host1 host2
|
||||
# ================== ===== =====
|
||||
# D56E6FABA26D1F1C-3 3 1
|
||||
EOF
|
||||
|
||||
is(
|
||||
|
@@ -257,7 +257,7 @@ is_deeply(
|
||||
|
||||
$report = <<EOF;
|
||||
# Warning level differences
|
||||
# Query ID Code dbh-1 dbh-2 Message
|
||||
# Query ID Code host1 host2 Message
|
||||
# ================== ==== ======= ===== ======================================
|
||||
# 4336C4AAA4EEF76B-1 1264 Warning Error Out of range value for column 'i' at row 1
|
||||
EOF
|
||||
@@ -291,10 +291,10 @@ $report = <<EOF;
|
||||
# New warnings
|
||||
# Query ID Host Code Message
|
||||
# ================== ===== ==== ==========================================
|
||||
# 4336C4AAA4EEF76B-1 dbh-1 1264 Out of range value for column 'i' at row 1
|
||||
# 4336C4AAA4EEF76B-1 host1 1264 Out of range value for column 'i' at row 1
|
||||
|
||||
# Warning count differences
|
||||
# Query ID dbh-1 dbh-2
|
||||
# Query ID host1 host2
|
||||
# ================== ===== =====
|
||||
# 4336C4AAA4EEF76B-1 1 0
|
||||
EOF
|
||||
@@ -325,10 +325,10 @@ $report = <<EOF;
|
||||
# New warnings
|
||||
# Query ID Host Code Message
|
||||
# ================== ===== ==== ==========================================
|
||||
# 4336C4AAA4EEF76B-1 dbh-2 1264 Out of range value for column 'i' at row 1
|
||||
# 4336C4AAA4EEF76B-1 host2 1264 Out of range value for column 'i' at row 1
|
||||
|
||||
# Warning count differences
|
||||
# Query ID dbh-1 dbh-2
|
||||
# Query ID host1 host2
|
||||
# ================== ===== =====
|
||||
# 4336C4AAA4EEF76B-1 0 1
|
||||
EOF
|
||||
|
@@ -36,9 +36,9 @@ select i from t where i is not null
|
||||
|
||||
|
||||
# Row count differences
|
||||
# Query ID 127.1:12345 127.1:12348
|
||||
# ================== =========== ===========
|
||||
# 3C830E3839B916D7-1 4 3
|
||||
# Query ID host1 host2
|
||||
# ================== ===== =====
|
||||
# 3C830E3839B916D7-1 4 3
|
||||
|
||||
# Statistics
|
||||
# events 1
|
||||
|
@@ -36,9 +36,9 @@ SELECT SUM(total) FROM test.t WHERE id > 0
|
||||
|
||||
|
||||
# Column value differences
|
||||
# Query ID Column 127.1:12345 127.1:12348
|
||||
# ================== ========== =========== ===========
|
||||
# C1B1E457814417E4-1 SUM(total) 14.68 13.68
|
||||
# Query ID Column host1 host2
|
||||
# ================== ========== ===== =====
|
||||
# C1B1E457814417E4-1 SUM(total) 14.68 13.68
|
||||
|
||||
# Statistics
|
||||
# events 1
|
||||
|
Reference in New Issue
Block a user