0

I am planning to implement a table checksum mechanism to validate that replication has occured between two master to master MySQL server. But before I know that hashing function always carry a collision risk and I would like to assess the risks of a collision scenario happening. Does anyone have any information to share or links to similar assessment.

My opinion is that the checksum of the same table on 2 replicated server we could basically neglect the risk of collision but I want facts to prove my assumption.

http://dev.mysql.com/doc/refman/5.0/en/checksum-table.html

Stainedart
  • 1,929
  • 4
  • 32
  • 53

1 Answers1

2

AFAIK, MySQL calculate the table checksum with CRC32 algorithm. It's very safe for almost data, but for the probability of the collision, please see CRC32 Collision .

And I also suggest Percona Toolkit. It has a similar tool for comparing tables by checksum.

And I also suggest Maatkit's solution - mk-table-checksum. Maatkit had been merged into Percona Toolkit. Thanks @BaronSchwartz.

Community
  • 1
  • 1
lqez
  • 2,898
  • 5
  • 25
  • 55
  • 1
    This is correct; it uses CRC32. I suggest Percona Toolkit instead of Maatkit. Maatkit is discontinued (merged into Percona Toolkit). –  Feb 13 '12 at 19:24