pt-table-checksum doesn't check the size of checksum chunks
Bug #1010232 reported by
Daniel Nichter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
High
|
Daniel Nichter |
Bug Description
pt-table-checksum 2.1.1 explains the next upper boundary statement and single-chunk statements, but it does not explain checksum chunk queries (i.e .when chunking a table). Usually, these are safe, but on occasion (e.g. Percona 23486), MySQL will access too many rows. So all checksum chunk nibbles need to be explained, too, and --chunk-size-limit applied to them.
Related branches
lp:~percona-toolkit-dev/percona-toolkit/explain-checksum-chunks
- Baron Schwartz (community): Approve
- Brian Fraser (community): Approve
- Daniel Nichter: Approve
-
Diff: 1357 lines (+767/-194)8 files modifiedbin/pt-online-schema-change (+304/-86)
bin/pt-table-checksum (+323/-85)
lib/NibbleIterator.pm (+24/-20)
lib/TableNibbler.pm (+6/-1)
t/lib/TableNibbler.t (+29/-1)
t/pt-table-checksum/chunk_index.t (+45/-1)
t/pt-table-checksum/samples/bad-plan-bug-1010232.sql (+17/-0)
t/pt-table-checksum/samples/n-chunk-index-cols.txt (+19/-0)
lp:~percona-toolkit-dev/percona-toolkit/chunk-index-columns-opt
- Baron Schwartz (community): Approve
- Daniel Nichter: Approve
-
Diff: 245 lines (+88/-42)5 files modifiedbin/pt-online-schema-change (+16/-19)
bin/pt-table-checksum (+16/-19)
lib/TableNibbler.pm (+1/-0)
t/lib/TableNibbler.t (+34/-1)
t/pt-table-checksum/chunk_index.t (+21/-3)
lp:~percona-toolkit-dev/percona-toolkit/detect-key-len-with-range-scan
- Daniel Nichter: Approve
-
Diff: 799 lines (+666/-31)5 files modifiedbin/pt-online-schema-change (+164/-12)
bin/pt-table-checksum (+164/-12)
lib/IndexLength.pm (+175/-0)
t/lib/IndexLength.pm (+135/-0)
t/pt-table-checksum/chunk_index.t (+28/-7)
tags: | added: safeguard |
tags: | added: pt-online-schema-change |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → In Progress |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've found additional problems with this when I specify a prefix that's larger than the number of columns in the index, in pt-osc.
$ bin/pt- online- schema- change --alter= 'engine= innodb' h=127.1, P=3306, D=sakila, t=film_ actor,u= root --lock- wait-timeout= 50 --dry-run --chunk-index PRIMARY:3 .`film_ actor` will not be altered. Specify --execute instead of --dry-run to alter the table. _film_actor_ new OK. .`_film_ actor_new` OK. .`film_ actor` was not altered. online- schema- change line 1904.
Starting a dry run. `sakila`
Creating new table...
Created new table sakila.
Altering new table...
Altered `sakila`
Not creating triggers because this is a dry run.
Not dropping triggers because this is a dry run.
Dropping new table...
Dropped new table OK.
Dry run complete. `sakila`
Use of uninitialized value in exists at bin/pt-