Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1556

pt-table-checksum 3.0.9 doesn't change binlog_format to statement anymore

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 3.0.9
    • 3.0.10
    • None
    • None

    Description

      After PT-1527 pt-table-checksum doesn't change binlog_format to STATMENT when --no-check-binlog-format is used. 

      Steps to reproduce

      1. Set up a master-slave replication with binlog_format=mixed|row.
      2. Create table
      CREATE TABLE `t` (
      `id` int(11) NOT NULL,
      `col1` text,
      PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT
      1. 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();

      1. 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
      1. 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

      Attachments

        Activity

          People

            carlos.salguero Carlos Salguero (Inactive)
            iwo.panowicz Iwo Panowicz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

                Smart Checklist