pt-online-schema-change creates temporal tables in Latin1 despite specifying UTF8 charset
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Invalid
|
Medium
|
Daniel Nichter |
Bug Description
Attempting to use pt-online-
ENGINE=InnoDB AUTO_INCREMENT=
So the data copy fails given the data attempted to be copied is in UTF8.
I'm trying to override the charset in the command line, and setting the defaults on server, specified for the temp table w/o success.
Command executed:
sudo pt-online-
Error:
`flexd_
(in cleanup) Error copying rows from `flexd_
Level: Warning
Code: 1366
Message: Incorrect string value: '\xF1ejo@g...' for column 'email' at row 2498
I believe the fix is to set the temp copy table encoding to UTF8, the question is how if the charset parameter is being ignored.
Related branches
tags: | added: charset pt-online-schema-change |
Changed in percona-toolkit: | |
status: | New → Confirmed |
milestone: | none → 2.2.3 |
Changed in percona-toolkit: | |
status: | Confirmed → Incomplete |
Changed in percona-toolkit: | |
importance: | Undecided → Medium |
Changed in percona-toolkit: | |
status: | Incomplete → In Progress |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
--charset is, unfortunately, a bit of a misnomer -- it should really be called --connection- charset. I think the solution here is simply changing the --alter statement to
--alter "CHARACTER SET utf8, MODIFY email VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci"
Which will modify the charset of the temp table to utf8.