Problem/Motivation

#1314214: MySQL driver does not support full UTF-8 (emojis, asian symbols, mathematical symbols) changed the default table collation for MySQL. When attempting to test beta upgrades in the Head 2 Head module, it was discovered that dumps generated *before* that change no longer load since they are created with the new utf8mb4 collation, rather than with their original collation.

Proposed resolution

Export collation with the table definition in the generated dump file.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#1 db-dump-collation-2522120-01.patch1.68 KBjhedstrom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

Status: Active » Needs review
FileSize
1.68 KB
catch’s picture

Priority: Normal » Major
Issue tags: +D8 upgrade path

Bumping to major. Any contrib or custom modules which need to go utf8 -> utf8mb or varchar -> varchar_ascii would be unable to test their upgrade paths if they want to upgrade from before the schema change was made until after during testing.

If core needs to make a collation change this would be critical, but it doesn't at the moment at least.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community

RTBC, I don't assume we can test this.

catch’s picture

Status: Reviewed & tested by the community » Fixed

So I think we probably could test this. Take a database dump with one collation (can be a test module db table). Then a hook_update_N() in that same test module to change the collation. Then either tricky asserts before and after to check the collation, or insert some characters that only work utf8 -> utf8mb or similar and confirm they get entered OK.

However, since this blocks the head2head testing issue which is going to give us excellent implicit test coverage of this, I would rather have good real-life implicit coverage aooner, than hold this up on test-framework-only explicit test coverage that will not be straightforward to write.

If someone feels like writing explicit coverage for this please open an issue and that's worth having though.

Committed/pushed to 8.0.x, thanks!

  • catch committed 90b4ae4 on 8.0.x
    Issue #2522120 by jhedstrom: DbDumpCommand should add collation...

Status: Fixed » Closed (fixed)

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