Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6351

Syntax error on equal transition table name and correlation name in statement trigger

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.4.1.3, 10.5.1.1, 10.6.1.0, 10.7.1.1, 10.8.1.2, 10.9.1.0, 10.10.1.1
    • 10.10.2.0, 10.11.1.1
    • SQL
    • None
    • Repro attached

    Description

      If a reference to a transition table in a statement trigger has a correlation name, and that correlation name is equal to the name of the transition table, the CREATE TRIGGER statement fails with a syntax error.

      To reproduce:

      ij version 10.10
      ij> connect 'jdbc:derby:db;create=true';
      ij> create table t1(x int);
      0 rows inserted/updated/deleted
      ij> create table t2(x int);
      0 rows inserted/updated/deleted
      ij> create trigger tr1 after insert on t1 referencing new table as n insert into t2 select x from n as n;
      ERROR 42X01: Syntax error: Encountered "as" at line 1, column 89.
      Issue the 'help' command for general information on IJ command syntax.
      Any unrecognized commands are treated as potential SQL commands and executed directly.
      Consult your DBMS server reference documentation for details of the SQL syntax supported by your server.
      

      Attachments

        1. d6351-1a.diff
          5 kB
          Knut Anders Hatlen

        Activity

          People

            knutanders Knut Anders Hatlen
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: