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

WordPress Trac noreply at wordpress.org
Mon May 23 08:36:01 UTC 2016


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

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37525"]:
 {{{
 #!CommitTicketReference repository="" revision="37525"
 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.

 Fixes #36748.
 }}}

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


More information about the wp-trac mailing list