--recursion-method documentation or behaviour incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Working with 2 instances on the same machine, ports 3307 and 3308, both non-standard.
# pt-table-checksum --version
pt-table-checksum 2.2.5
# pt-table-checksum --defaults-
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
# pt-table-checksum --defaults-
(slave is detected)
According to the docs:
"The processlist method is the default, because SHOW SLAVE HOSTS is not reliable. However, if the server uses a non-standard port (not 3306), then the hosts method becomes the default because it works better in this case."
Probably both the docs AND the behaviour should be changed -try hosts every time show processlist fails?. Maybe pt-table-sync is also affected?
Sample slave my.cnf (I have a non-standard port and report-host -hosts doesn't work without it. Master is similar, running in 3307):
[mysqld]
datadir = /usr/local/slave
tmpdir = /usr/local/slave
port = 3308
user = mysql
bind-address = 127.0.0.1
report-host = 127.0.0.1
socket = /usr/local/
pid-file = /usr/local/
#log-bin = /usr/local/
#binlog_format = ROW
relay-log = /usr/local/
slow-query-log
slow-query-log-file = /usr/local/
long-query-time = 1
log-error = /usr/local/
server-id = 2
skip-slave-start
skip-name-resolve
#innodb settings
innodb-
innodb-
innodb-
innodb-
[client]
user = root
host = localhost
port = 3308
socket = /usr/local/
[mysql]
prompt = "\u@slave (\d)> "
This occurs when pt-table-checksum connects to the master via socket even if master port is not 3306:
1) To test create master and slave and make sure they do not use port 3306
2) Use pt-table-checksum to connect to socket: /tmp/mysql_ sandbox20886. sock
PTDEBUG=1 pt-table-checksum --socket=
*** ;host=localhost ;mysql_ socket= /tmp/mysql_ sandbox20886. sock;mysql_ read_default_ group=client undef undef mysql_enable_ utf8=>0, ShowErrorStatem ent=>1, AutoCommit=>1, RaiseError=>1, PrintError=>0
# DSNParser:1567 7903 DBI:mysql:
# MasterSlave:5051 7903 Recursion methods: processlist hosts
***