Merge branch '3.0' into PT-1707

This commit is contained in:
Carlos Salguero
2019-10-29 08:57:38 -03:00
150 changed files with 6526 additions and 2776 deletions

View File

@@ -2315,6 +2315,10 @@ sub parse {
}
}
if ($final_props{F}) {
%final_props = ( 'F' => $final_props{F} );
}
return \%final_props;
}
@@ -3011,13 +3015,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';
@@ -3030,6 +3041,9 @@ sub get_slave_status {
$ss = { map { lc($_) => $ss->{$_} } keys %$ss }; # lowercase the keys
return $ss;
}
if (!$ss && $self->{channel}) {
die "Specified channel name is invalid";
}
}
PTDEBUG && _d('This server returns nothing for SHOW SLAVE STATUS');
@@ -6140,6 +6154,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA.
=head1 VERSION
pt-slave-restart 3.0.13
pt-slave-restart 3.1.0
=cut