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.
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' table-checksum 2012-03-02 15:51:28 +0000 table-checksum 2012-03-19 17:30:07 +0000
--- bin/pt-
+++ bin/pt-
@@ -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.