Not the answer you need?
Register and ask your own question!

How can I get Pt-table-checksum to show diffs?

omggsomggs EntrantCurrent User Role Beginner
I am using Pt-table-checksum to verify replication integrity. I have intentionally changed a column in a row in one of my replicas. Here is what I did-

pt-table-checksum "h=192.168.1.86,u=replication,p=replication,P=3320" --function=MD5 --databases=test</pre>


and the output I get is

TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE09-04T18:21:46 0 0 3 1 0 0.112 test.xyz</pre>


My question is, should not the DIFFS column in the output say 1 instead of 0? What am I missing here?

Can Pt-table-checksum also tell the diffs in the replicas by pin pointing to that row?

Comments

  • niljoshiniljoshi MySQL Sage Inactive User Role Beginner
    Hi, It should work. I have tested locally with simple master-slave replication.

    On Master,


    mysql> select count(*) from nil.test1;+
    +| count(*) |+
    +| 12 |+
    +1 row in set (0.00 sec)</pre>


    On slave,


    mysql> select count(*) from nil.test1;+
    +| count(*) |+
    +| 8 |+
    +1 row in set (0.00 sec)</pre>


    See below,


    [email protected]:~$ pt-table-checksum -h 127.0.0.1 -u user -ppass --port=19771 --databases=nil TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE09-13T13:59:25 0 1 12 1 0 0.716 nil.test109-13T13:59:26 0 0 0 1 0 0.634 nil.test2</pre>

    Can you try again to check that pt-table-checksum can able to connect to slave or not?

    pt-table-checksum, only tell the differences in the replicas but If you want to check which data differences are there than you can use pt-table-sync utility with --print option. It will give you "REPLACE INTO" queries of differences.

    http://www.percona.com/doc/percona-toolkit/2.1/pt-table-sync .html
  • omggsomggs Entrant Current User Role Beginner
    Tried again, but it simply does not work for me. But I see that .

    Both Master and Slave have MySQL version: 5.1.36-community-log

    <cite>Quote:</cite>
    Can you try again to check that pt-table-checksum can able to connect to slave or not?
    As far as I have understood has to connect to the Master server only. Am I mistaken?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.