From b2cb95940ffc33e6d12c9b574737ae57b7b2ab6f Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Mon, 8 Oct 2012 12:53:54 -0600 Subject: [PATCH] Merge partial-fix-1063912-ptc-pxc-slaves/ -r403..405 --- bin/pt-table-checksum | 10 +++++++++- lib/Cxn.pm | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index c6a26d7a..4ee45a8c 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -3320,7 +3320,9 @@ sub is_cluster_node { PTDEBUG && _d($sql); my $row = $self->{dbh}->selectrow_arrayref($sql); PTDEBUG && _d(defined $row ? @$row : 'undef'); - $self->{is_cluster_node} = $row && $row->[0] ? 1 : 0; + $self->{is_cluster_node} = $row && $row->[1] + ? ($row->[1] eq 'ON' || $row->[1] eq '1') + : 0; return $self->{is_cluster_node}; } @@ -11313,6 +11315,12 @@ nodes and regular replicas because nodes are not regular replicas so they cannot be detected automatically. The lag check (see L<"REPLICA CHECKS">) is not performed for cluster nodes. +Mixed replication setups are not currently supported. For example, the tool +does not work completely if the master host is replicating to a cluster, +or if the cluster is replicating to another cluster. In short, the only +supported setup is a single cluster with nodes optionally having traditional +replication slaves. + =back =head1 BUGS diff --git a/lib/Cxn.pm b/lib/Cxn.pm index becaeb29..5efca626 100644 --- a/lib/Cxn.pm +++ b/lib/Cxn.pm @@ -203,7 +203,9 @@ sub is_cluster_node { PTDEBUG && _d($sql); my $row = $self->{dbh}->selectrow_arrayref($sql); PTDEBUG && _d(defined $row ? @$row : 'undef'); - $self->{is_cluster_node} = $row && $row->[0] ? 1 : 0; + $self->{is_cluster_node} = $row && $row->[1] + ? ($row->[1] eq 'ON' || $row->[1] eq '1') + : 0; return $self->{is_cluster_node}; }