HeidiSQL icon indicating copy to clipboard operation
HeidiSQL copied to clipboard

ERROR when SQL export from MariaDB to MySQL

Open NigelGomm opened this issue 6 months ago • 4 comments

Description

trying to export a table from a MariaDB server to a MYSQL one. Heidi generates this

CREATE TABLE IF NOT EXISTS `audittrail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Adatetime` datetime DEFAULT NULL,
  `Tablename` varchar(50) DEFAULT NULL,
  `Acontext` varchar(250) DEFAULT NULL,
  `Pk` int(11) DEFAULT NULL,
  `Jsondata` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL,
  `Verb` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pk` (`Pk`),
  KEY `verb` (`Verb`),
  KEY `tablename` (`Tablename`),
  KEY `adatetime` (`Adatetime`)
) ENGINE=InnoDB AUTO_INCREMENT=32429 DEFAULT CHARSET=latin1;

and the embedded "/!100301 COMPRESSED/" comment causes an error in mySQL.

image

HeidiSQL version

12.6.0.6849

Database server version

MariaDB 10.3

Error/Backtrace

/* [rentman21] SQL Error (1064): 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 '1 COMPRESSED*/ DEFAULT NULL,
  `Verb` varchar(10) DEFAULT NULL,
  PRIMARY KEY ' at line 7 */

Reproduction recipe

SQL EXPORT from mariadb to mysql server. a table with a medium text column. image

NigelGomm avatar Aug 06 '24 17:08 NigelGomm