Merge pull request #408 from percona/PT-1344

PBM-144 Updated MasterSlave to support hosts without port
This commit is contained in:
Carlos Salguero
2019-07-18 12:08:00 -03:00
committed by GitHub
10 changed files with 32 additions and 23 deletions

View File

@@ -3745,6 +3745,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -321,6 +321,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -4027,6 +4027,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -4281,8 +4281,7 @@ sub recurse_to_slaves {
PTDEBUG && _d('Connected to', $dp->as_string($slave_dsn));
};
if ( $EVAL_ERROR ) {
#TODO REMOVE DEBUG
print STDERR "1> Cannot connect to ", $dp->as_string($slave_dsn), "\n"
print STDERR "Cannot connect to ", $dp->as_string($slave_dsn), "\n"
or die "Cannot print: $OS_ERROR";
return;
}
@@ -4350,6 +4349,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -10675,6 +10675,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -2435,6 +2435,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -2846,6 +2846,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -5299,6 +5299,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -6844,6 +6844,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -272,6 +272,7 @@ sub _find_slaves_by_processlist {
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
$host ||= $_->{host};
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}