Ticket #8014 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

dbDelta Breaks on backtick

Reported by: AaronCampbell Owned by: anonymous
Priority: high Milestone: 2.8
Component: General Version: 2.7
Severity: major Keywords: has-patch tested needs-unittests
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

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

Change History

Trims backticks from table and field names

  • 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

  • Keywords needs-unittests added

See also #8768

  • Version set to 2.7

Patch updated for current trunk code

  • Keywords tested added; needs-testing removed

comment:5   ryan3 years ago

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

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

Note: See TracTickets for help on using tickets.