Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#34874 closed defect (bug) (fixed)

dbDelta Case Sensitive Key Names Duplicates Indexes

Reported by: charlestonsw's profile charlestonsw Owned by: pento's profile pento
Milestone: 4.7 Priority: normal
Severity: normal Version: 3.5.1
Component: Database Keywords:
Focuses: performance Cc:

Description

Reference ticket #10404.

This is to decompose the original ticket into components. May be fixed in 4.4. Needs testing.


Using an uppercase index name will create duplicate indexes:

  KEY MY_KEY ( SLUG ),

This works:

 KEY my_key ( slug ),

Change History (3)

#1 @jdgrimes
9 years ago

I can confirm that this bug is still present in trunk.

From the MySQL reference:

Column, index, stored routine, and event names are not case sensitive on any platform, nor are column aliases.

So this ticket is correct that we shouldn't be treating indexes as if they are case sensitive.

#2 @pento
8 years ago

  • Milestone changed from Awaiting Review to 4.7
  • Owner set to pento
  • Status changed from new to assigned

#3 @pento
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 38591:

Database: Normalise index names in dbDelta().

When comparing index definitions, normalise the index names to lower case, as they are not case sensitive within MySQL.

Fixes #34874.

Note: See TracTickets for help on using tickets.