Comment 4 for bug 953141

Revision history for this message
Brian Fraser (fraserbn) wrote :

We are currently thinking how to best fix this, but getting the behavior that Fernando needed took surprisingly little:

=== modified file 'bin/pt-table-checksum'
--- bin/pt-table-checksum 2012-03-02 15:51:28 +0000
+++ bin/pt-table-checksum 2012-03-19 17:30:07 +0000
@@ -2549,8 +2549,7 @@

    my @methods = qw(processlist hosts);
    if ( $method ) {
- @methods = grep { $_ ne $method } @methods;
- unshift @methods, $method;
+ @methods = $method;
    }
    else {
       if ( ($dsn->{P} || 3306) != 3306 ) {

To expand a bit on that, currently, if you use '--recursion-method=processlist' or =host, it won't disable the other; it'll just rearrange the order so that whichever was passed down is tried first. The problem here lies in that, if the method you passed in doesn't return slaves, it'll try the other way, which you might not have priviledges to use.
The only big determent to fixing this is that, by using --recursion-method, there would be no way to explicitly set the current behavior.