From c91246e1ca1ee3978731963a52bb04f2dc9cd0b5 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Wed, 30 Jan 2013 13:30:31 -0300 Subject: [PATCH] Fix for 1105077: pt-table-checksum: Confusing error message with binlog_format ROW or MIXED on slave --- bin/pt-table-checksum | 13 +++++++------ t/pt-table-checksum/bugs.t | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index c8217d83..9eca8857 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -8765,12 +8765,13 @@ sub main { } if ( $master_binlog ne $slave_binlog ) { - $err .= $master_cxn->name() . " has binlog_format " - . $master_binlog . " but replica " . $slave_cxn->name() - . " has binlog_format $slave_binlog. This could cause " - . "pt-table-checksum to break replication. " - . "If you understand the risks, specify " - . "--no-check-binlog-format to disable this check.\n"; + $err .= "Replica " . $slave_cxn->name() + . qq{ has binlog_format $slave_binlog which could cause } + . qq{pt-table-checksum to break replication. Please read } + . qq{"Replicas using row-based replication" in the } + . qq{LIMITATIONS section of the tool's documentation. } + . qq{If you understand the risks, specify } + . qq{--no-check-binlog-format to disable this check.\n}; } } die $err if $err; diff --git a/t/pt-table-checksum/bugs.t b/t/pt-table-checksum/bugs.t index 4f2c9969..0cc78dde 100644 --- a/t/pt-table-checksum/bugs.t +++ b/t/pt-table-checksum/bugs.t @@ -256,7 +256,7 @@ SKIP: { $output = output( sub { pt_table_checksum::main(@args) }, stderr => 1 ); - my $re = qr/ has binlog_format .*? has binlog_format (\S+)\./msi; + my $re = qr/Replica .+? has binlog_format (\S+)/msi; like( $output, $re,