Merge lp:~percona-toolkit-dev/percona-toolkit/fix-1052475-ptc-uninit-crash-slave-errors into lp:percona-toolkit/2.1

Proposed by Brian Fraser
Status: Merged
Approved by: Daniel Nichter
Approved revision: 441
Merged at revision: 470
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/fix-1052475-ptc-uninit-crash-slave-errors
Merge into: lp:percona-toolkit/2.1
Diff against target: 16 lines (+6/-0)
1 file modified
bin/pt-table-checksum (+6/-0)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/fix-1052475-ptc-uninit-crash-slave-errors
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+134592@code.launchpad.net
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-table-checksum'
2--- bin/pt-table-checksum 2012-11-13 15:22:01 +0000
3+++ bin/pt-table-checksum 2012-11-16 01:14:24 +0000
4@@ -10444,6 +10444,12 @@
5 next;
6 }
7 }
8+ # If we have no chunks, which can happen if the slaves
9+ # were skipped due to errors, then @chunks will be empty
10+ # and nothing of the following applies. In fact, it
11+ # leads to an uninit warning because of $chunks[0]; See
12+ # https://bugs.launchpad.net/percona-toolkit/+bug/1052475
13+ next unless @chunks;
14 @chunks = sort { $a <=> $b } @chunks;
15 if ( $chunks[0] < $max_chunk ) {
16 if ( $check_pr ) {

Subscribers

People subscribed via source and target branches