[MDEV-8765] mysqldump silently corrupts 4-byte UTF-8 data Created: 2015-09-07 Updated: 2018-10-12 Resolved: 2018-10-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Scripts & Clients |
| Affects Version/s: | 10.0.20 |
| Fix Version/s: | 10.3.11, 10.4.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Daniël van Eeden | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly, contribution, foundation, upstream-fixed | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Bug for Oracle MySQL: https://bugs.mysql.com/bug.php?id=71746 But this also affect MariaDB 10.0:
|
| Comments |
| Comment by Daniel Black [ 2018-01-01 ] |
|
upstream fixed as per ebaff9fffc958030a57d8ea7f1f2d527cac1df64 mariadb needs to change include/my_global.h:#define MYSQL_UNIVERSAL_CLIENT_CHARSET to utf8mb4 Really trivial fix to prevent backup corruption, even if utf8mb4 isn't the default. |
| Comment by Sergey Vojtovich [ 2018-01-23 ] |
|
Raised priority as there's pull request now. |
| Comment by Rutuja Surve (Inactive) [ 2018-04-03 ] |
|
@Sergey could you add the link to the pull request here |
| Comment by Sergey Vojtovich [ 2018-04-03 ] |
|
rutuja, there's a link on the right side under "Development" section. |
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-04-20 ] |
|
Hi, I confirm this on both 5.5 and 10.3 using the UTF dataset available at: The fix in the associated PR#547 does fix the dump issue, instead of garbage '?', mysqldump does export the proper UTF symbols after patching, without the need for explicit --default-character-set. As far as the actual fix in the PR, at least the mysqldump* tests need adjusting, however, I can't speak for the overall implications of switching MYSQL_UNIVERSAL_CLIENT_CHARSET to utfmb4 for the entire suite. Someone better suited should evaluate that. Thank you! |
| Comment by Alexander Barkov [ 2018-10-12 ] |
|
This issue is critical for the JSON data type, which is an alias to longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin. |