Update MasterSlave in all tools and add "none" to --recursion-method docs. Tools pass their tests.

This commit is contained in:
Daniel Nichter
2012-05-17 08:54:36 -06:00
parent e969d8d9f7
commit 392f74fc60
7 changed files with 51 additions and 5 deletions

View File

@@ -1614,6 +1614,9 @@ sub get_slaves {
dsn_table_dsn => $dsn_table_dsn,
);
}
elsif ( $method =~ m/none/i ) {
PTDEBUG && _d('Not getting to slaves');
}
else {
die "Invalid --recursion-method: $method. Valid values are: "
. "dsn=DSN, hosts, or processlist.\n";
@@ -1628,6 +1631,11 @@ sub recurse_to_slaves {
my $dp = $args->{dsn_parser};
my $dsn = $args->{dsn};
if ( lc($args->{method} || '') eq 'none' ) {
PTDEBUG && _d('Not recursing to slaves');
return;
}
my $dbh;
eval {
$dbh = $args->{dbh} || $dp->get_dbh(
@@ -3179,9 +3187,10 @@ Preferred recursion method used to find slaves.
Possible methods are:
METHOD USES
=========== ================
=========== ==================
processlist SHOW PROCESSLIST
hosts SHOW SLAVE HOSTS
none Do not find slaves
The processlist method is preferred because SHOW SLAVE HOSTS is not reliable.
However, the hosts method is required if the server uses a non-standard