Here are my pma stats:
Apache/2.4.7 (Ubuntu)
Database client version: libmysql - 5.5.43
PHP extension: mysqli Documentation
PHP version: 5.5.9-1ubuntu4.9
Version information: 4.4.8 (up to date)
Git revision: db53824 from STABLE branch,
committed on May 28, 2015 at 03:36 AM by Marc Delisle
When doing database exports, with "Use backquotes" off. It is not backquoting some reserved words.
To recreate, use this database schema
CREATE TABLE IF NOT EXISTS order
(
id int(11) NOT NULL,
blah text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS othertable (
id int(11) NOT NULL,
id_fk int(11) NOT NULL,
blah int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE order
ADD PRIMARY KEY (id);
ALTER TABLE othertable
ADD PRIMARY KEY (id),
ADD KEY id_fk (id_fk);
ALTER TABLE order
MODIFY id int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE othertable
MODIFY id int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE othertable
ADD CONSTRAINT othertable_ibfk_1 FOREIGN KEY (id_fk) REFERENCES order
(id);
Do a custom database export and change these options from default:
Set to False: Enclose table and column names with backquotes
When you look at the export it will show this:
ALTER TABLE othertable
ADD CONSTRAINT othertable_ibfk_1 FOREIGN KEY (id_fk) REFERENCES order (id);
Which is not valid SQL.
This is a regression of a bug that was already fixed. #4663
Fixed with https://github.com/phpmyadmin/phpmyadmin/commit/cd2ee14a7cb495fe8ec7343487a6cfaf4262aae3