--recursion-method documentation or behaviour incorrect

Bug #1247677 reported by Jaime Crespo on 2013-11-03
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT

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-file=master/my.cnf
Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
# pt-table-checksum --defaults-file=master/my.cnf --recursion-method=hosts
(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):
datadir = /usr/local/slave
tmpdir = /usr/local/slave
port = 3308
user = mysql
bind-address =
report-host =
socket = /usr/local/slave/mysql.sock
pid-file = /usr/local/slave/mysql.pid
#log-bin = /usr/local/slave/binlog
#binlog_format = ROW
relay-log = /usr/local/slave/relay
slow-query-log-file = /usr/local/slave/slow.log
long-query-time = 1
log-error = /usr/local/slave/error.log
server-id = 2

#innodb settings
innodb-log-file-size = 500M
innodb-buffer-pool-size = 5G
innodb-flush-log-at-trx-commit = 2

user = root
host = localhost
port = 3308
socket = /usr/local/slave/mysql.sock

prompt = "\u@slave (\d)> "

Jaime Sicam (jssicam) wrote :

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:
PTDEBUG=1 pt-table-checksum --socket=/tmp/mysql_sandbox20886.sock

# DSNParser:1567 7903 DBI:mysql:;host=localhost;mysql_socket=/tmp/mysql_sandbox20886.sock;mysql_read_default_group=client undef undef mysql_enable_utf8=>0, ShowErrorStatement=>1, AutoCommit=>1, RaiseError=>1, PrintError=>0
# MasterSlave:5051 7903 Recursion methods: processlist hosts

Changed in percona-toolkit:
status: New → Confirmed

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1168

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers