Menu

#26 Extraction fails when table has reserved column name

v1.0_(example)
closed-fixed
None
5
2018-08-30
2018-06-19
Anonymous
No

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.

Discussion

  • Ralf Wisser

    Ralf Wisser - 2018-06-21
    • status: open --> pending-fixed
    • assigned_to: Ralf Wisser
     
  • Ralf Wisser

    Ralf Wisser - 2018-06-21

    Fixed in release 7.10

     
  • Ralf Wisser

    Ralf Wisser - 2018-08-30
    • status: pending-fixed --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo