mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
WIP
This commit is contained in:
@@ -449,13 +449,20 @@ sub get_slave_status {
|
||||
if (!$self->{channel}) {
|
||||
die 'This server returned more than one row for SHOW SLAVE STATUS but "channel" was not specified on the command line';
|
||||
}
|
||||
my $slave_use_channels;
|
||||
for my $row (@$sss_rows) {
|
||||
$row = { map { lc($_) => $row->{$_} } keys %$row }; # lowercase the keys
|
||||
if ($row->{channel_name}) {
|
||||
$slave_use_channels = 1;
|
||||
}
|
||||
if ($row->{channel_name} eq $self->{channel}) {
|
||||
$ss = $row;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (!$ss && $slave_use_channels) {
|
||||
die 'This server is using replication channels but "channel" was not specified on the command line';
|
||||
}
|
||||
} else {
|
||||
if ($sss_rows->[0]->{channel_name} && $sss_rows->[0]->{channel_name} ne $self->{channel}) {
|
||||
die 'This server is using replication channels but "channel" was not specified on the command line';
|
||||
|
Reference in New Issue
Block a user