The MySQL DB service is generating dumps using a generated config file. That config file does not include a default character set, causing it to usually default to utf8 or what ever happens to be the compile-time default. Because of this, Unicode characters in the supplementary character set (beyond U+FFFF) will be lost when the database is dumped. This is critical, because not only causes it the backups to be not usable, it furthermore also causes any migration to make the sites lose the supplementary characters since a migration uses DB dump+restore.

CommentFileSizeAuthor
#2 provision-mysqldumputf8mb4-3160565-1.patch433 bytessseidel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sseidel created an issue. See original summary.

sseidel’s picture

sseidel’s picture

Status: Active » Needs review
martin_q’s picture

I have not tested this but I have looked over the patch. It seems sane to me. A couple of probably very minor suggestions, which may not even be anything anyone cares about:

Does it need an 'identical' comparison or would if ($this->server->utf8mb4_is_supported) be sufficient?

The original string doesn't contain \n but instead literal ends-of-lines, so does this patch introduce unnecessary inconsistency?

  • helmo committed d709326 on 7.x-3.x authored by sseidel
    Issue #3160565 by sseidel, martin_q: MySQL database backups are not...
helmo’s picture

Status: Needs review » Fixed

Thanks, committed ... with @martin_q's remarks.

PS: an alternative/workaround is to add that to the global mysql config in the [mysqldump] section.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.