pt-table-sync line-ending problems with --print

Bug #1170454 reported by Mrten on 2013-04-18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit

Bug Description

I've been using pt-table-sync to get tables for a new server synced. The procedure I've been using is that I use pt-table-sync --print to get queries to fix the differences in a file, then run that file, on the slave, with mysql < [file]. I know that it isn't perfect but I have ample opportunity to run pt-table-checksum again and again.

This works perfectly but for one snag: line-endings. CRLF's in varchars get truncated to LF's...

So, I'd suggest language in the manual to this effect:

"Be careful running the queries that are generated with --print, you may run into problems with line-endings for varchars".

Or, if you like, accept attached patch into pt-table-sync.

Mrten (bugzilla-ii) wrote :

The patch is incomplete; it has a problem with negative ints (-1 becomes 2147483647, maxint) . I've got a newer patch but I'll wait for comments before I spam some more.

tags: added: newline pt-table-checksum
Changed in percona-toolkit:
status: New → Confirmed
Mrten (bugzilla-ii) wrote :

Bitrotted "newer patch" by offline request; I hope it applies cleanly! I diffed to 2.2.2 and removed the edits that were not mine (but the intent is probably clear).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers