A simple MySQL example:
CREATE DATABASE test;
CREATE TABLE test (
id int(11) NOT NULL,
sensitive varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Create an extraction model for the subject test and run the export. It fails with:
"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 'sensitive From JAILER_ENTITY E join test T on E.PK0=T.id Where E.birthday>=0 and' at line 1" in statement "Select T.id as id, T.sensitive as sensitive From JAILER_ENTITY E join test T on E.PK0=T.id Where E.birthday>=0 and E.r_entitygraph=60999 and E.type=0"
This is because 'sensitive' is a reserved word in MySQL. While the column name is quoted in the DDL, the alias in the generated SQL statement is not quoted.
Anonymous
Fixed in release 7.10