[buddypress-trac] [BuddyPress Trac] #6346: Upgrade DB tables to utf8mb4

buddypress-trac noreply at wordpress.org
Fri Aug 12 08:41:42 UTC 2016


#6346: Upgrade DB tables to utf8mb4
-------------------------+------------------
 Reporter:  DJPaul       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  high         |   Milestone:  2.7
Component:  Core         |     Version:
 Severity:  major        |  Resolution:
 Keywords:  needs-patch  |
-------------------------+------------------
Changes (by DJPaul):

 * priority:  normal => high
 * milestone:  Future Release => 2.7


Comment:

 When BP 2.7 comes out in a couple months, #7117 fixed the default charset;
 we'll default to what WordPress uses (`utf8mb4`). So new installs will be
 fine. Up until then, BuddyPress has been using the default charset as
 specified by MySQL. On my laptop, that's `latin1`.

 WordPress migrated its tables to utf8mb4 with an appropriate charset, if
 (via https://make.wordpress.org/core/2015/04/02/the-utf8mb4-upgrade/):

 * You’re currently using the utf8 character set.
 * Your MySQL server is version 5.5.3 or higher (including all 10.x
 versions of MariaDB).
 * Your MySQL client libraries are version 5.5.3 or higher. If you’re using
 mysqlnd, 5.0.9 or higher.

 The first part of this is implemented in WP's
 `maybe_convert_table_to_utf8mb4()`.
 The other schema change that was required were restrictions on some
 indexes' sizes. I've just checked, and we've done those changes correctly
 in r9695.

 **A remaining task is to run `strip_invalid_text_for_column` where
 appropriate, as @boonebgorges and @r-a-y discussed above, about a year
 ago.**

 There is an argument to be made that we should upgrade existing site's BP
 table schemas from `<anything>` to utf8mb4, but because `<anything>` could
 and will be different across different servers, this sounds technically
 complicated to do in a robust way, and if we get it wrong, we'll corrupt
 our users' data. There is probably a Good Reason why WordPress only
 updates `utf8` to `utf8mb4`.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6346#comment:25>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list