Merge lp:~percona-toolkit-dev/percona-toolkit/pt-table-checksum-fails-on-BINARY-field-in-PK-1381280 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.14
Proposed by
Frank Cizmich
Status: | Merged |
---|---|
Approved by: | Daniel Nichter |
Approved revision: | 615 |
Merged at revision: | 615 |
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/pt-table-checksum-fails-on-BINARY-field-in-PK-1381280 |
Merge into: | lp:~percona-toolkit-dev/percona-toolkit/release-2.2.14 |
Diff against target: |
115 lines (+42/-13) 2 files modified
bin/pt-table-checksum (+41/-12) t/pt-table-checksum/progress.t (+1/-1) |
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-table-checksum-fails-on-BINARY-field-in-PK-1381280 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Approve | ||
Review via email: mp+255002@code.launchpad.net |
Description of the change
Problem:
pt-table-checksum fails on tables where a binary column is used as key. This is because the upper and lower boundary column of the checksum table is of type text and fails when storing these keys.
Solution/
Good results have been obtained changing checksum datatype to binary (blob)
Since a foolproof testing of this approach in all cases is very difficult, a less risky compromise approach is used: the --binary-key option is provided and documented so as to permit users to create the checksum table with blob datatype.
To post a comment you must log in.
PT tries to use "index" instead of "key" because it's a little more proper (CREATE INDEX, not CREATE KEY; --chunk-index; etc.), so I'd suggest --binary-index as the option name.
MySQL columns types are usually written as uppercase...