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
1=== modified file 'bin/pt-mysql-summary'
2--- bin/pt-mysql-summary 2014-11-11 13:28:27 +0000
3+++ bin/pt-mysql-summary 2015-01-05 15:41:58 +0000
4@@ -2397,7 +2397,7 @@
5
6 # Now that we have the cmd line opts, check that we can actually
7 # connect to MySQL.
8- [ -n "$(mysql $EXT_ARGV -e 'SELECT 1')" ] \
9+ [ -n "$(mysql $EXT_ARGV -e 'SHOW STATUS')" ] \
10 || die "Cannot connect to MySQL. Check that MySQL is running and that the options after -- are correct."
11
12 }

Subscribers

People subscribed via source and target branches

to all changes: