Merge lp:~percona-toolkit-dev/percona-toolkit/pt-mysql-summary-fails-on-cluster-node-in-Donor-or-Desynced-status-1402668 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.13

Proposed by Frank Cizmich
Status: Merged
Approved by: Daniel Nichter
Approved revision: 612
Merged at revision: 619
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/pt-mysql-summary-fails-on-cluster-node-in-Donor-or-Desynced-status-1402668
Merge into: lp:~percona-toolkit-dev/percona-toolkit/release-2.2.13
Diff against target: 12 lines (+1/-1)
1 file modified
bin/pt-mysql-summary (+1/-1)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-mysql-summary-fails-on-cluster-node-in-Donor-or-Desynced-status-1402668
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+245582@code.launchpad.net

Description of the change

problem:
when used on a node which is in status: "donor" or "desynced" tool fails when testing connection because it uses the test "select 1"

Although "select" doesn't work, "show status" does, and a lot of data can still be retrieved from that node.

solution:
simply changed connection test to "show status"

To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/pt-mysql-summary'
--- bin/pt-mysql-summary 2014-11-11 13:28:27 +0000
+++ bin/pt-mysql-summary 2015-01-05 15:41:58 +0000
@@ -2397,7 +2397,7 @@
23972397
2398 # Now that we have the cmd line opts, check that we can actually2398 # Now that we have the cmd line opts, check that we can actually
2399 # connect to MySQL.2399 # connect to MySQL.
2400 [ -n "$(mysql $EXT_ARGV -e 'SELECT 1')" ] \2400 [ -n "$(mysql $EXT_ARGV -e 'SHOW STATUS')" ] \
2401 || die "Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct."2401 || die "Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct."
24022402
2403}2403}

Subscribers

People subscribed via source and target branches

to all changes: