Bug #78348 mysqlpump support for 4-byte UTF-8
Submitted: 6 Sep 2015 9:09 Modified: 7 Sep 2015 7:38
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqlpump, utf8, utf8mb4

[6 Sep 2015 9:09] Daniël van Eeden
Closely related:
Bug #71746 	mysqldump may use utf8mb4 as default-character-set

$ mysqlpump --databases unicodedata --skip-extended-insert | grep DOLPHIN
mysqlpump: [Warning] option 'extended-insert': unsigned value 0 adjusted to 1
Dump progress: 0/1 tables, 1/29820 rows
INSERT INTO `unicodedata`.`ucd` VALUES ("1F42C","?","DOLPHIN","So","0","ON",'','','','',"N",'','','','','');
Dump completed in 1510 milliseconds

It doesn't dump 4-byte UTF-8 correctly (get converted to ?)
It doesn't give a warning or error.
It doesn't switch to utf8mb4 when there are utf8mb4 columns present.

How to repeat:
Try to dump utf8mb4 data.
[7 Sep 2015 6:08] MySQL Verification Team
Hi Daniel,

Thank you for the report.
Confirmed that 5.7.8-rc build is affected but no longer seeing this issue with latest 5.7.9 builds(I'm couldn't find a bug which fixed this issue). I'm attaching the output generated from 5.7.9 for your reference.

[7 Sep 2015 6:08] MySQL Verification Team
5.7.8 and 5.7.9 test results

Attachment: 78348.results (application/octet-stream, text), 2.38 KiB.

[7 Sep 2015 7:38] Daniël van Eeden
Indeed looks somehow it got fixed on 5.7.9 (couldn't verify it myself, but that output certainly indicates this). I assume you didn't set the character set in my.cnf or ~/.my.cnf