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

WordPress Trac noreply at wordpress.org
Wed Jun 1 12:58:38 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 ocean90):

 In [changeset:"37606"]:
 {{{
 #!CommitTicketReference repository="" revision="37606"
 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, after the `utf8mb4` 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 original size, so
 let's do that.

 Merge of [37525] to the 4.5 branch.

 Props pento.
 See #36748.
 }}}

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


More information about the wp-trac mailing list