ChangeHandler doesn't quote varchar columns with hex-looking values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Brian Fraser |
Bug Description
Reported by Alex Geis (ageis) on https:/
Alex Geis (ageis) wrote on 2012-08-01: #4
Chiming in here as I've run into a problem with both pt-table-sync and pt-archiver. I've written a simple script to first archive a table to a backup table using pt-archiver with delete turned off, and then run pt-table-sync to keep it synced from time to time. Unfortunately, there are thousands of entries that aren't copied correctly on archive and aren't synced corrected due to a specific varchar field not being quoted (from what appears to be due to the field appearing as hex where it's not). Including an example.
The problematic field is: `screen_name`=0xD1
(where screen_name is a twitter username, so obviously not supposed to be hex)
UPDATE `21social_
... additional fields...
`followers_
Hide comment
Alex Geis (ageis) wrote on 2012-08-01: #5
Temporarily solved the issue I mentioned by commenting out the following line in pt-table-sync, even though I figure it's not a good solution...
return $val if $val =~ m/^0x[0-
Related branches
- Daniel Nichter: Approve
-
Diff: 571 lines (+151/-50)21 files modifiedbin/pt-archiver (+3/-2)
bin/pt-deadlock-logger (+3/-2)
bin/pt-duplicate-key-checker (+3/-2)
bin/pt-find (+3/-2)
bin/pt-fk-error-logger (+3/-2)
bin/pt-heartbeat (+3/-2)
bin/pt-index-usage (+3/-2)
bin/pt-kill (+3/-2)
bin/pt-online-schema-change (+3/-2)
bin/pt-query-advisor (+3/-2)
bin/pt-query-digest (+3/-2)
bin/pt-slave-restart (+3/-2)
bin/pt-table-checksum (+3/-2)
bin/pt-table-sync (+16/-6)
bin/pt-table-usage (+3/-2)
bin/pt-upgrade (+16/-6)
lib/ChangeHandler.pm (+13/-4)
lib/Quoter.pm (+3/-2)
t/lib/ChangeHandler.t (+44/-2)
t/lib/Quoter.t (+5/-2)
t/lib/samples/bug_1038276.sql (+12/-0)
- Brian Fraser (community): Approve
- Daniel Nichter: Pending requested
-
Diff: 71 lines (+30/-3)3 files modifiedbin/pt-table-sync (+1/-1)
lib/ChangeHandler.pm (+1/-1)
t/lib/ChangeHandler.t (+28/-1)
Changed in percona-toolkit: | |
assignee: | nobody → Brian Fraser (fraserbn) |
milestone: | none → 2.1.4 |
status: | New → In Progress |
tags: | added: pt-table-checksum pt-table-sync value-quoting |
Changed in percona-toolkit: | |
importance: | Undecided → Medium |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
This fix broke t/pt-table- sync/issue_ 22.t. See 2.1 @ r382.