WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#14445 new defect (bug)

dbdelta do not handel FULLTEXT KEY correctly and generate MySQL errors

Reported by: edirect24 Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 3.0
Component: Database Keywords: has-patch tested
Focuses: Cc:

Description

When using dbdelta during the update of a plugin that a Fulltext index use, dbdelta generate a MYSQL error due to duplicate index.

This is due to the array_search return always false.

I attached a posible solution to address this issue. I added a key named 'index_type' to the $index_ary. This way, when 'index_type' == fulltext, I add to $index_string "FULLTEXT".

Attachments (2)

upgrade.php.patch (1.1 KB) - added by edirect24 4 years ago.
Proposed patch for wp-admin/includes/upgrade.php
14445.diff (942 bytes) - added by mdawaffe 3 years ago.

Download all attachments as: .zip

Change History (3)

edirect244 years ago

Proposed patch for wp-admin/includes/upgrade.php

comment:1 mdawaffe3 years ago

  • Component changed from General to Database
  • Keywords tested added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

Confirmed.

Patch works for me. Refreshed.

mdawaffe3 years ago

Note: See TracTickets for help on using tickets.