Bug #29563 mysqlbinlog produces statements in incorrect charset when charset=ucs2
Submitted: 5 Jul 2007 6:17 Modified: 24 Oct 2007 22:54
Reporter: Stewart Smith Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.1.19, telco OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: bfsm_2007_10_18

[5 Jul 2007 6:17] Stewart Smith
Description:
for row based (at least... possibly statement as well, haven't checked), if you set master to --default-collation=ucs2_general_ci (ucs2_unicode_ci just crashes... see BUG#29562), and then use mysqlbinlog to print the binary log (and pipe it into mysql client) it sets the client charset to UCS2 and then uses SET @@session.character_set_client in latin1 (which really doesn't work).

How to repeat:
set mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt to:
--default-collation=ucs2_general_ci --default-character-set=ucs2,latin1

and run the test.

If you pipe this binlog through mysqlbinlog into the mysql client, it gets it very wrong...

Suggested fix:
I'm attaching a *partial* fix. This only fixes one instance... there's a few other places where this is a problem (likely everywhere).
[5 Jul 2007 6:18] Stewart Smith
partial fix for mysqlbinlog

Attachment: mysqlbinlog_charset_fix.patch (text/x-patch), 1.54 KiB.

[23 Oct 2007 21:24] Lars Thalmann
Duplicate of BUG#29562.