Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1750

pt-archiver scrambling a binary blob column

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.0.13
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Ubuntu 16.04

      pt-archiver 3.0.13

      MySQL 5.7.21

      Description

      We currently are trying to use pt-archiver to archive and trim old data out of our MySQL 5.7 database on AWS RDS. The archiver works as expected in our tasks except for one problem - it seems to mangle the binary data in one column. A normal mysqldump of the same row is able to be restored correctly. The normal method for handing binary data is to use --hex-blob (with mysqldump) or hex() and unhex() on the field, but I see no way to do that with pt-archiver. To get around this limitation we're currently performing a dump with mysqldump then using pt-archiver to trim the rows afterwards. This method is adequate but much slower and more cumbersome. Is there a way to preserve binary data archived from pt-archiver? Or a way to hex() that field during the archive process? Here is the command we are using:

      pt-archiver --file /data/test.dump.$(date +%s).sql --where "_created < '2014-12-31 23:59:59' AND _created > '2014-01-01 00:00:00'" --source D=client_db,t=messages --charset 'utf8' --statistics --progress 10000

      the resulting archive is able to be restored without complaint, but the binary data field is mojibake garbage.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                wvaladez.pascal William Valadez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: