pt-table-checksum error when column name has two spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Daniel Nichter |
Bug Description
This is my table:
CREATE TABLE `bedrijven2011_
`BEDRIJF-ID` int(10) DEFAULT NULL,
`AJB Vermelding-ID` int(10) NOT NULL AUTO_INCREMENT,
`Afval Jaarboek` varchar(20) DEFAULT NULL,
`Vet` tinyint(1) NOT NULL,
[trimmed for brevity]
PRIMARY KEY (`AJB Vermelding-ID`)
) ENGINE=MyISAM AUTO_INCREMENT=1419 DEFAULT CHARSET=latin1
This is the error:
Error checksumming table afval.bedrijven
There are two spaces in the column definition of 'Afval Jaarboek', but there is only one in the resulting REPLACE INTO query.
Related branches
tags: | added: pt-table-checksum whitespace |
Changed in percona-toolkit: | |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
summary: |
- pt-table-checksum has error when columnname has two spaces + pt-table-checksum error when column name has two spaces |
Changed in percona-toolkit: | |
milestone: | none → 2.0.4 |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
The problem is caused by this line in TableParser: :get_create_ table() : $href->{$key} =~ s/\b[ ]{2,}/ /g; That was introduced in r121 when pt-table-checksum 2.0 was merged. MySQLDump.pm was removed and TableParser.pm took over functions like get_create_table(). I probably flattened spaces to make testing consistent, but this shouldn't be done; the original MySQLDump: :get_create_ table() didn't alter the table def. So I'll fix this.