drizzledump migration utf8 conversion issue

Bug #709126 reported by Andrew Hutchings
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
High
Andrew Hutchings
7.0
Fix Released
High
Andrew Hutchings

Bug Description

<mbutubuntu> hello folks
<mbutubuntu> I've a problem of charset with drizzle
<mbutubuntu> the same DB has different outputs from MySQL to Drizzle
<mbutubuntu> the problem is that è becomes something like è
...
<marcuse> mbutubuntu: show create table <tablename>
<mbutubuntu> it's not utf
<mbutubuntu> it's latin1

so, either drizzledump is not doing it's job properly or the user has utf8 data stored in a latin1 column. I need to figure out which

Related branches

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

How to reproduce:

mysql> set names latin1;
mysql> create table t1 (a int, b varchar(255));
mysql> insert into t1 values (1,'èèèèèèèèèèèèèè');
(note the è has to be a utf8 char)

Drizzledump output:
...
CREATE TABLE `t1` (
  `a` INT DEFAULT NULL,
  `b` VARCHAR(255) COLLATE utf8_general_ci DEFAULT NULL
) ENGINE='InnoDB' COLLATE='utf8_general_ci';

ALTER TABLE `t1` DISABLE KEYS;
INSERT INTO `t1` VALUES (1,'èèèèèèèèèèèèèè');
ALTER TABLE `t1` ENABLE KEYS;
...

This is because drizzledump is telling MySQL to convert utf8 characters, which are stored in a latin1 field, into utf8. So basically a double-conversion where one really isn't needed.

Going to play with adding a --my-data-is-mangled option which won't tell MySQL to do the conversion.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.