Make WordPress Core

Opened 16 years ago

Closed 11 years ago

#14445 closed enhancement (fixed)

dbdelta do not handel FULLTEXT KEY correctly and generate MySQL errors

Reported by: edirect24 Owned by: pento
Priority: normal Milestone: 4.4
Component: Database Version: 3.0
Severity: normal Keywords: has-patch
Cc: Focuses:

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 16 years ago.
Proposed patch for wp-admin/includes/upgrade.php
14445.diff (942 bytes ) - added by mdawaffe 16 years ago.

Download all attachments as: .zip

Change History (9)

@edirect24
16 years ago

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

#1 @mdawaffe
16 years ago

  • Component GeneralDatabase
  • Keywords tested added; dev-feedback removed
  • Milestone Awaiting ReviewFuture Release

Confirmed.

Patch works for me. Refreshed.

@mdawaffe
16 years ago

#2 @chriscct7
12 years ago

  • Keywords tested removed
  • Resolutioninvalid
  • Status newclosed

DbDelta was removed before this patch could be merged.

#3 @ocean90
12 years ago

  • Resolution invalid
  • Status closedreopened

#4 @chriscct7
12 years ago

It does indeed. I'm sorry about that. Not sure what I was thinking.

#5 @chriscct7
11 years ago

  • Owner set to pento
  • Severity minornormal
  • Status reopenedreviewing

@pento what do you think about this?

#6 @pento
11 years ago

  • Milestone Future Release4.4
  • Status reviewingaccepted
  • Type defect (bug)enhancement

#7 @pento
11 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 35487:

Upgrades: Add support for FULLTEXT indexes to dbDelta().

Props edirect24, mdawaffe, pento.

Fixes #14445.

Note: See TracTickets for help on using tickets.