WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#8014 closed defect (bug) (fixed)

dbDelta Breaks on backtick

Reported by: AaronCampbell Owned by:
Milestone: 2.8 Priority: high
Severity: major Version: 2.7
Component: General Keywords: has-patch tested needs-unittests
Focuses: Cc:

Description

backticks (`), which I think are best practice for MySQL, seem to kill dbDelta. It matches the table name and all the fields with the backticks still on them, then tries to match them to the database versions (`wp_mytable` != wp_mytable).

Attachments (2)

8014.001.diff (1.1 KB) - added by AaronCampbell 5 years ago.
Trims backticks from table and field names
8014.002.2.diff (920 bytes) - added by aaroncampbell 5 years ago.
Patch updated for current trunk code

Download all attachments as: .zip

Change History (7)

AaronCampbell5 years ago

Trims backticks from table and field names

comment:1 westi5 years ago

  • Milestone changed from 2.7 to 2.8

Not sure we should change this at this late stage in 2.7

Leave this for early 2.8

comment:2 mrmist5 years ago

  • Keywords needs-unittests added

See also #8768

comment:3 Denis-de-Bernardy5 years ago

  • Version set to 2.7

aaroncampbell5 years ago

Patch updated for current trunk code

comment:4 aaroncampbell5 years ago

  • Keywords tested added; needs-testing removed

comment:5 ryan5 years ago

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

(In [10948]) Handle backticks in dbDelta. Props AaronCampbell. fixes #8014

Note: See TracTickets for help on using tickets.