Warnings and Errors with pt-table-checksum

Hi,

I’m receiving a couple errors when I run pt-table-checksum over an older 5.0.60-enterprise-gpl-log.

Here is the command I’m using (against the master):

pt-table-checksum -uroot -predacted
–replicate test.ptchecksums --create-replicate-table --empty-replicate-table --chunk-size=1M
–databases BIMCDB
–tables=agentnotes
–ignore-columns image,versionfile
db.panora.local

Below is the first message received. I’m not having any hangs or lockups when I run it over all tables. What is the significance of this message?

Failed to SET SESSION innodb_lock_wait_timeout=1: DBD::mysql::db do failed: Unknown system variable ‘innodb_lock_wait_timeout’ [for Statement “SET SESSION innodb_lock_wait_timeout=1”] at /usr/bin/pt-table-checksum line 6450.

The current innodb_lock_wait_timeout value 50 is greater than the --lock-wait-timeout value 1 and the variable cannot be changed. innodb_lock_wait_timeout is only dynamic when using the InnoDB plugin. To prevent this warning, either specify --lock-wait-time=50, or manually set innodb_lock_wait_timeout to a value less than or equal to 1 and restart MySQL.

This is the message that seems more important. I run the slave on a nonstandard port number so that no one will accidentally connect to it.
Cannot connect to h=lx20.panora.local,p=…,u=root

How can I tell pt-table-checksum that the slave (lx20) is running on a nonstandard port?

Thank you.

Regards,
Rich

Hi,

Failed to SET SESSION innodb_lock_wait_timeout=1: DBD::mysql::db do failed: Unknown system variable ‘innodb_lock_wait_timeout’ [for Statement “SET SESSION innodb_lock_wait_timeout=1”] at /usr/bin/pt-table-checksum line 6450.

As mentioned from the documentation, setting innodb_lock_wait_timeout to 1 is a safeguard so that pt-table-checksum would be the victim instead of timing out other queries. See http://www.percona.com/doc/percona-toolkit/2.1/pt-table-chec ksum.html

As for the slave with a different port, you can change the recursion method for discovering other replicas. For example, assuming your master is at IP address 192.168.1.32 and slave is at IP address 192.168.1.33 with port 21983, you will need to create a dsns table in the master and provide the dsn of your slave:

mysql> use percona;
mysql> CREATE TABLE dsns (
id int(11) NOT NULL AUTO_INCREMENT,
parent_id int(11) DEFAULT NULL,
dsn varchar(255) NOT NULL,
PRIMARY KEY (id)
);
mysql> insert into dsns values(“h=192.168.1.33,P=21983”);

The next step is running pt-table-checksum with the option --recursion-method:
pt-table-checksum h=192.168.1.32,P=3306,u=,p= --recursion-method=dsn=D=percona,t=dsns

I hope this helps.