pt-table-sync fail to connect to IPv6 slaves
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In _find_slaves_
It does not work correctly for IPv6 addresses.
For example:
the original Host value, returned by MySQL is 2a00:f100:
After parsing with "$_->{host} =~ m/^([^:]+):/" (line 6746) - only "2a00" is left.
The possibly correct regex is "m/^(.+):\d+$/".
Also, square brackets must be added before and after IPv6 address, so that DBD::MySQL parses DSN correctly.
So "[2a00:
Required info:
Command line: pt-table-sync --execute localhost --replicate filter._checksums --verbose --noversion-check --lock=0
Version: pt-table-sync 2.2.15
MySQL: MariaDB 10.0.21
Relevant part of output:
# MasterSlave:6732 16423 Found 6 slaves
# MasterSlave:6709 16423 Recursing from h=localhost to h=2a00
# MasterSlave:6666 16423 Recursion methods: processlist hosts
# DSNParser:2169 16423 DBI:mysql:
# DSNParser:2218 16423 DBI:mysql:
# DSNParser:2218 16423 DBI:mysql:
Cannot connect to h=2a00
You can check my fix here: https:/ /github. com/miihael/ percona- toolkit/ commit/ 407d94fec127307 42c85a0687ad6c6 de4599b99e
Also, DBD:MySQL version 4.033 is the requirement for IPv6 addresses to work correctly.