Update MasterSlave.pm in all tools.

This commit is contained in:
Daniel Nichter
2011-08-23 08:31:04 -06:00
parent ff59f479e6
commit 4715afc7c0
8 changed files with 29 additions and 15 deletions

View File

@@ -1670,7 +1670,9 @@ sub get_master_status {
MKDEBUG && _d($dbh, 'SHOW MASTER STATUS');
$sth->execute();
my ($ms) = @{$sth->fetchall_arrayref({})};
MKDEBUG && _d(@$ms);
MKDEBUG && _d(
$ms ? map { "$_=" . (defined $ms->{$_} ? $ms->{$_} : '') } keys %$ms
: '');
if ( !$ms || scalar keys %$ms < 2 ) {
MKDEBUG && _d('Server on dbh', $dbh, 'does not seem to be a master');
@@ -1872,7 +1874,7 @@ sub is_replication_thread {
my ( $self, $query, %args ) = @_;
return unless $query;
my $type = lc $args{type} || 'all';
my $type = lc($args{type} || 'all');
die "Invalid type: $type"
unless $type =~ m/^binlog_dump|slave_io|slave_sql|all$/i;