PT-1707 IPV6 support for recursion method processlist

This commit is contained in:
Carlos Salguero
2019-04-11 17:44:17 -03:00
parent a9eeeb6fb1
commit a97e24be71
22 changed files with 65 additions and 52 deletions

View File

@@ -45,7 +45,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -3744,7 +3744,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -43,7 +43,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -42,7 +42,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -38,7 +38,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -39,7 +39,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -35,7 +35,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -37,7 +37,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -44,7 +44,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -320,7 +320,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -45,7 +45,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -47,7 +47,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -4026,7 +4026,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -56,7 +56,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -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;
}
@@ -4349,7 +4348,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -64,7 +64,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -10674,7 +10674,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -40,7 +40,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

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

View File

@@ -41,7 +41,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -2845,7 +2845,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -58,7 +58,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -5298,7 +5298,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -55,7 +55,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';
@@ -6843,7 +6843,7 @@ sub _find_slaves_by_processlist {
}
grep { $_ }
map {
my ( $host ) = $_->{host} =~ m/^([^:]+):/;
my ( $host ) = $_->{host} =~ m/^(.*):\d+$/;
if ( $host eq 'localhost' ) {
$host = '127.0.0.1'; # Replication never uses sockets.
}

View File

@@ -61,7 +61,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -44,7 +44,7 @@ BEGIN {
{
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

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

View File

@@ -18,7 +18,7 @@
# ###########################################################################
package Percona::Toolkit;
our $VERSION = '3.0.13';
our $VERSION = '3.0.14-dev';
use strict;
use warnings FATAL => 'all';

View File

@@ -632,6 +632,20 @@ SKIP: {
$dbh->disconnect();
}
is_deeply(
$dp->parse('h=f000::1,P=12345,u=msandbox,p=msandbox'),
{ u => 'msandbox',
p => 'msandbox',
S => undef,
h => 'f000::1',
P => '12345',
F => undef,
D => undef,
A => undef,
},
'IPV6 support'
);
# #############################################################################
# Done.
# #############################################################################