diff --git a/bin/pt-config-diff b/bin/pt-config-diff index 4ab90df4..8ee7a9f9 100755 --- a/bin/pt-config-diff +++ b/bin/pt-config-diff @@ -2400,9 +2400,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/bin/pt-deadlock-logger b/bin/pt-deadlock-logger index ab93561e..a5d6b97c 100755 --- a/bin/pt-deadlock-logger +++ b/bin/pt-deadlock-logger @@ -2744,9 +2744,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/bin/pt-fk-error-logger b/bin/pt-fk-error-logger index 891d713a..13d5ba65 100755 --- a/bin/pt-fk-error-logger +++ b/bin/pt-fk-error-logger @@ -1896,9 +1896,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/bin/pt-kill b/bin/pt-kill index bb394235..1b5c1a82 100755 --- a/bin/pt-kill +++ b/bin/pt-kill @@ -5263,9 +5263,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index 0850a9c8..a12d6c39 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -3860,9 +3860,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index 0b966195..f7e486ca 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -3638,9 +3638,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/bin/pt-upgrade b/bin/pt-upgrade index 991181ab..8f57b7eb 100755 --- a/bin/pt-upgrade +++ b/bin/pt-upgrade @@ -2569,9 +2569,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } sub remove_duplicate_cxns { diff --git a/lib/Cxn.pm b/lib/Cxn.pm index aff491db..b8dc7168 100644 --- a/lib/Cxn.pm +++ b/lib/Cxn.pm @@ -235,9 +235,8 @@ sub is_cluster_node { PTDEBUG && _d($cxn->name, $sql); my $row = $cxn->dbh->selectrow_arrayref($sql); PTDEBUG && _d(Dumper($row)); - return unless $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1'); + return $row && $row->[1] && ($row->[1] eq 'ON' || $row->[1] eq '1') ? 1 : 0; - return 1; } # There's two reasons why there might be dupes: