Implement and test --recursion-method=none in MasterSlave.pm and pt-table-checksum.

This commit is contained in:
Daniel Nichter
2012-05-17 08:11:30 -06:00
parent 64f4a5bdc0
commit e969d8d9f7
5 changed files with 214 additions and 1 deletions

View File

@@ -76,6 +76,10 @@ sub get_slaves {
dsn_table_dsn => $dsn_table_dsn,
);
}
elsif ( $method =~ m/none/i ) {
# https://bugs.launchpad.net/percona-toolkit/+bug/987694
PTDEBUG && _d('Not getting to slaves');
}
else {
die "Invalid --recursion-method: $method. Valid values are: "
. "dsn=DSN, hosts, or processlist.\n";
@@ -110,6 +114,12 @@ sub recurse_to_slaves {
my $dp = $args->{dsn_parser};
my $dsn = $args->{dsn};
if ( lc($args->{method} || '') eq 'none' ) {
# https://bugs.launchpad.net/percona-toolkit/+bug/987694
PTDEBUG && _d('Not recursing to slaves');
return;
}
my $dbh;
eval {
$dbh = $args->{dbh} || $dp->get_dbh(