Details
-
Bug
-
Status: Done
-
High
-
Resolution: Fixed
-
3.0.9
-
None
-
None
Description
After pt-table-checksum doesn't change binlog_format to STATMENT when --no-check-binlog-format is used. PT-1527
Steps to reproduce
- Set up a master-slave replication with binlog_format=mixed|row.
- Create table
CREATE TABLE `t` (
`id` int(11) NOT NULL,
`col1` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT
- Add some data on master and slave
master> insert into test.t set id = 1, col1=unix_timestamp(); master> insert into test.t set id = 2, col1=unix_timestamp(); slave> insert into test.t set id = 3, col1=unix_timestamp(); slave> insert into test.t set id = 4, col1=unix_timestamp();
stamp();
- Check table checksum
master> checksum table test.t\G *************************** 1. row *************************** Table: test.t Checksum: 2473563911 slave> checksum table test.t\G *************************** 1. row *************************** Table: test.t Checksum: 3347800819
- run pt-table-checksum
$ pt-table-checksum --version pt-table-checksum 3.0.9
# pt-table-checksum --databases=test --replicate=percona.checksums h=127.0.0.1,u=msandbox,p=msandbox,P=20795 Checking if all tables can be checksummed ... Starting checksum ... Replica notek has binlog_format ROW which could cause pt-table-checksum to break replication. Please read "Replicas using row-based replication" in the LIMITATIONS section of the tool's documentation. If you understand the risks, specify --no-check-binlog-format to disable this check.
# pt-table-checksum --databases=test --no-check-binlog-format --replicate=percona.checksums h=127.0.0.1,u=msandbox,p=msandbox,P=20795
Checking if all tables can be checksummed ...
Starting checksum ...
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
05-18T14:50:15 0 0 2 1 0 0.026 test.t
3.0.8 works fine
# pt-table-checksum --version pt-table-checksum 3.0.8
# pt-table-checksum --databases=test --replicate=percona.checksums h=127.0.0.1,u=msandbox,p=msandbox,P=20795 Checking if all tables can be checksummed ... Starting checksum ... Replica notek has binlog_format ROW which could cause pt-table-checksum to break replication. Please read "Replicas using row-based replication" in the LIMITATIONS section of the tool's documentation. If you understand the risks, specify --no-check-binlog-format to disable this check.
# pt-table-checksum --databases=test --no-check-binlog-format --replicate=percona.checksums h=127.0.0.1,u=msandbox,p=msandbox,P=20795
Checking if all tables can be checksummed ...
Starting checksum ...
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
05-18T14:53:55 0 1 2 1 0 0.026 test.t