empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harald Kirsch (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Created] (EMPIREDB-216) reserved words as colum names not correctly escaped/quoted for derby
Date Fri, 14 Nov 2014 13:31:33 GMT
Harald Kirsch created EMPIREDB-216:
--------------------------------------

             Summary: reserved words as colum names not correctly escaped/quoted for derby
                 Key: EMPIREDB-216
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-216
             Project: Empire-DB
          Issue Type: Bug
    Affects Versions: empire-db-2.4.3
            Reporter: Harald Kirsch


Created from getCreateDDLScript() I get

 CREATE TABLE DIM_date (
    ID INT GENERATED ALWAYS AS IDENTITY NOT NULL,
   ...
    year SMALLINT NOT NULL,
    ...
 );

I get

2014-11-14T13:01:14Z	ERROR	org.apache.empire.db.DBSQLScript	java.sql.SQLSyntaxErrorException:
Syntax error: Encountered "year" at line 6, column 4.
 java.sql.SQLSyntaxErrorException: Syntax error: Encountered "year" at line 6, column 4.
 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)

I think all column names in generated scripts should be enclosed in double quotes to shield
against such misinterpretation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message