[wp-trac] [WordPress Trac] #34870: dbDelta Not Specifying Key Length Duplicate Indexes

WordPress Trac noreply at wordpress.org
Tue Jan 17 04:00:11 UTC 2017

#34870: dbDelta Not Specifying Key Length Duplicate Indexes
 Reporter:  charlestonsw  |       Owner:  pento
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.8
Component:  Database      |     Version:  2.8.1
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  performance
Changes (by pento):

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


 In [changeset:"39921"]:
 #!CommitTicketReference repository="" revision="39921"
 dbDelta: Ignore index subparts when checking for duplicate indices.

 If index lengths change in table definitions, we don't recreate the index
 - instead, we throw a database error, as `dbDelta()` tries to create a new
 index with the same name.

 It's better to leave the index as is, MySQL doesn't have an efficient
 process for resizing indices, and dropping/creating is a slow process
 which we don't want to trigger automatically.

 Fixes #34870.

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

More information about the wp-trac mailing list