pt-table-checksum doesn't test all hash functions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Brian Fraser |
Bug Description
pt-table-checksum doesn't test all hash functions in available array and continues anyway on error.
To Test/Reproduce:
Change line:
my @funcs = qw(CRC32 MD5 SHA1);
To:
my @funcs = qw(CRC32A MD5 SHA1);
Run pt-t-c. The test for CRC32A will fail but script continues as if it has chosen bad function. Script will eventually exit on SQL error when master attempts to use bad function.
Additionally, the online-
The attached patch adds MURMUR_HASH, FNV1A_64 and FNV_64 to check list in preferred order over built-ins. The patch also continues evaluation of all functions until it finds one or dies with appropriate message.
Related branches
- Daniel Nichter: Approve
-
Diff: 65 lines (+20/-2)3 files modifiedbin/pt-table-checksum (+1/-0)
lib/RowChecksum.pm (+3/-2)
t/lib/RowChecksum.t (+16/-0)
tags: | added: crash pt-table-checksum wrong-behavior |
Changed in percona-toolkit: | |
status: | New → Triaged |
tags: |
added: chunking pt-table-checkum removed: pt-table-checksum |
tags: | removed: wrong-behavior |
Changed in percona-toolkit: | |
milestone: | none → 2.1.6 |
importance: | Undecided → Medium |
tags: |
added: pt-table-checksum removed: pt-table-checkum |
Changed in percona-toolkit: | |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
assignee: | Daniel Nichter (daniel-nichter) → Brian Fraser (fraserbn) |
Changed in percona-toolkit: | |
status: | Triaged → In Progress |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Let's change
my @funcs = qw(CRC32 FNV1A_64 FNV_64 MD5 SHA1);
to
my @funcs = qw(CRC32 FNV1A_64 FNV_64 MURMUR_HASH MD5 SHA1);