Problem/Motivation
As of #1314214: MySQL driver does not support full UTF-8 (emojis, asian symbols, mathematical symbols), migrate_drupal's integration tests for Drupal 7 started breaking. I looked into it and discovered that certain dump files (namely System.php) define 255-character keys, which exceed the 191-character limit imposed by InnoDB when using the utf8mb4 character set. This causes tests to fail because the system table can never be created.
Testbot didn't catch this because no Drupal 7 migrations/tests have actually been committed yet (one was RTBCed, which is what revealed this problem). The Drupal 6 dumps were unaffected because its System.php dump file defines the filename column as varchar_ascii, which circumvents this snafu.
Proposed Resolution
migrate-db.sh needs to export the MySQL character set when dumping tables. The attached patch sets the mysql_character_set key in the dump files, and includes regenerated versions of all the dumps (D6 and D7), which is why it's a big patch.
Remaining Tasks
Review and commit. This is holding up development of the D7 migration path, so it's high priority.
API / UI Changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| migrate_db_character_set.patch | 163.21 KB | phenaproxima |
Comments
Comment #1
phenaproximaComment #2
mikeryanI think an rtbc should come from someone who has been involved in the dump support - I'll just testify that the D6 upgrade process using migrate_upgrade module continues to work fine with this patch.
Comment #3
benjy commentedWhy are there length changes in the dumps as well?
Comment #4
phenaproximaI'm not 100% sure, but it looks like the Schema API removed support for specifying the length of int fields. I base this on the fact that, no matter how the fields are defined, int fields are always given a length of 11 by MySQL, and unsigned ints are always 10. It's consistent throughout the dump files in the patch. So if we commit, this should go away.
Comment #5
benjy commentedWe discussed #4, and I think the noise of length changes will be a one off in this patch. Rest is all good.
Comment #6
alexpottCommitted 143d7b2 and pushed to 8.0.x. Thanks!