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)
Change History (9)
#1
@
16 years ago
- Component General → Database
- Keywords tested added; dev-feedback removed
- Milestone Awaiting Review → Future Release
Confirmed.
Patch works for me. Refreshed.
#2
@
12 years ago
- Keywords tested removed
- Resolution → invalid
- Status new → closed
DbDelta was removed before this patch could be merged.
#3
@
12 years ago
- Resolution invalid
- Status closed → reopened
dbDelta still exists: https://developer.wordpress.org/reference/functions/dbdelta/
#5
@
11 years ago
- Owner set to
- Severity minor → normal
- Status reopened → reviewing
@pento what do you think about this?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Proposed patch for wp-admin/includes/upgrade.php