mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 13:46:22 +00:00
PT-139 Detect only 1 slave using rep channels
If there is only one slave but it is using replication channels but --channel was not specified as a parameter, get_slave_status will return null.
This commit is contained in:
@@ -457,7 +457,12 @@ sub get_slave_status {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ss = $sss_rows->[0];
|
||||
if ($sss_rows->[0]->{channel_name} && $sss_rows->[0]->{channel_name} ne $self->{channel}) {
|
||||
warn 'This server is using replication channels but "channel" was not specified on the command line';
|
||||
return undef;
|
||||
} else {
|
||||
$ss = $sss_rows->[0];
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ss && %$ss ) {
|
||||
|
Reference in New Issue
Block a user