[wp-trac] [WordPress Trac] #35958: Failing dbDelta tests due to MySQL error

WordPress Trac noreply at wordpress.org
Fri Feb 26 14:13:25 UTC 2016

#35958: Failing dbDelta tests due to MySQL error
 Reporter:  johnbillion   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:

Comment (by jdgrimes):

 I think that this is partly an issue with the tests, since a key on a
 `VARCHAR(255)` field can only be `191` in length, when using utf8mb4. So I
 think that the keys ought to look like this:

         KEY key_1 (column_1(191)),
         KEY compound_key (id,column_1(171)),

 However, I don't get this error when I run the tests on my local machine.
 I believe that the reason is likely due to a difference in MySQL
 configuration, probably your MySQL database has a different default
 character set than mine. This is why WordPress always specifies the
 character set and collation when creating tables. But we don't do that
 here in these unit tests, which is likely why we're seeing inconsistent

 I'm no expert though, so I'm happy to be corrected on all this. :-)

Ticket URL: <https://core.trac.wordpress.org/ticket/35958#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list