mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
Update MasterSlave.pm in all tools.
This commit is contained in:
@@ -2981,7 +2981,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');
|
||||
@@ -3183,7 +3185,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;
|
||||
|
||||
|
@@ -289,7 +289,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');
|
||||
@@ -491,7 +493,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;
|
||||
|
||||
|
@@ -2693,7 +2693,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');
|
||||
@@ -2895,7 +2897,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;
|
||||
|
||||
|
@@ -10681,7 +10681,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');
|
||||
@@ -10883,7 +10885,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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -1830,7 +1830,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');
|
||||
@@ -2032,7 +2034,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;
|
||||
|
||||
|
@@ -4056,7 +4056,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;
|
||||
|
||||
|
@@ -6072,7 +6072,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');
|
||||
@@ -6274,7 +6276,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;
|
||||
|
||||
|
Reference in New Issue
Block a user