[wp-trac] [WordPress Trac] #36748: Updating tables to utf8mb4 causes some columns to change type unexpectedly

WordPress Trac noreply at wordpress.org
Fri Jul 1 11:41:58 UTC 2016


#36748: Updating tables to utf8mb4 causes some columns to change type unexpectedly
-----------------------------+--------------------------
 Reporter:  tollmanz         |       Owner:  pento
     Type:  defect (bug)     |      Status:  reopened
 Priority:  normal           |   Milestone:  4.5.3
Component:  Upgrade/Install  |     Version:  4.2
 Severity:  normal           |  Resolution:
 Keywords:  fixed-major      |     Focuses:  performance
-----------------------------+--------------------------

Comment (by pento):

 In [changeset:"37938"]:
 {{{
 #!CommitTicketReference repository="" revision="37938"
 Database: `dbDelta()` will no longer try to downgrade the size of `TEXT`
 and `BLOB` columns.

 When upgrading to `utf8mb4`, `TEXT` fields will be upgraded to
 `MEDIUMTEXT` (and likewise for all other `*TEXT` and `*BLOB` fields). This
 is to allow for the additional space requirements of `utf8mb4`.

 On the subsequent upgrade, `dbDelta()` would try and downgrade the fields
 to their original size again. At best, this it a waste of time, at worst,
 this could truncate any data larger than the original size. There's no
 harm in leaving them at their new size, so let's do that.

 The `FULLTEXT` indexes are removed from the tests, as `dbDelta()`'s
 `FULLTEXT` support was added in WordPress 4.4.

 This also fixes a typo in the `dbDelta()` tests.

 Merge of [37525] to the 4.3 branch.
 Partial merge of [36552] to the 4.3 branch.

 See #36748.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36748#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list