Steps to reproduce
-
Have a comment on a field with default null
-
Export with phpmyadmin
The Comment will be wrapped in backticks with AS before it.. which breaks importing on mysql due to invalid syntax.
Expected behaviour
`name_id` int(11) DEFAULT NULL COMMENT 'rev to a specific name if needed',
Actual behaviour
`name_id` int(11) DEFAULT NULL COMMENT AS `rev to a specific name if needed`,
Server configuration
Operating system: Ubuntu 14.04 LTS
Web server: Apache 2.4.7
Database: mysql 5.5.47
PHP version: 5.5.9
phpMyAdmin version: 4.5.5.1deb1.trusty~ppa.1
Client configuration
Browser: Firefox 44.0.2
Operating system: Windows 7 x64
I run a mysql 5.6 instance locally and 5.5 on the server. I noticed that recently the export from phpmyadmin does not work anymore. When trying to import from CLI to mysql 5.6 I see invalid syntax such as:
ERROR 1064 (42000) at line 64: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS `rev to a specific name if need
ed`,
`origin_season` int(11) DEFAULT NULL,
' at line 6
Looking at the .sql I see the abnormal COMMENT breaking the import:
CREATE TABLE `directrules` (
`id` int(11) NOT NULL,
`origin_id` int(11) NOT NULL,
`destination_id` int(11) NOT NULL,
`element_id` int(11) NOT NULL COMMENT 'only to elements with type show',
`name_id` int(11) DEFAULT NULL COMMENT AS `rev to a specific name if needed`,
`origin_season` int(11) DEFAULT NULL,
`origin_episode` int(11) DEFAULT NULL,
`destination_season` int(11) DEFAULT NULL,
`destination_episode` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Looking through the file I see this happens for all 'DEFAULT NULL' entries with a COMMENT.
Steps to reproduce
Have a comment on a field with default null
Export with phpmyadmin
Expected behaviour
Actual behaviour
Server configuration
Operating system: Ubuntu 14.04 LTS
Web server: Apache 2.4.7
Database: mysql 5.5.47
PHP version: 5.5.9
phpMyAdmin version: 4.5.5.1deb1.trusty~ppa.1
Client configuration
Browser: Firefox 44.0.2
Operating system: Windows 7 x64
I run a mysql 5.6 instance locally and 5.5 on the server. I noticed that recently the export from phpmyadmin does not work anymore. When trying to import from CLI to mysql 5.6 I see invalid syntax such as:
Looking at the .sql I see the abnormal COMMENT breaking the import:
Looking through the file I see this happens for all 'DEFAULT NULL' entries with a COMMENT.