Uploaded image for project: 'Empire-DB'
  1. Empire-DB
  2. EMPIREDB-216

reserved words as colum names not correctly escaped/quoted for derby

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • empire-db-2.4.3
    • empire-db-2.4.4
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            doebele Rainer Döbele
            haraldk Harald Kirsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: