db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-6383) dblook gives wrong column list for update trigger that references transition table
Date Mon, 21 Oct 2013 12:34:43 GMT
Knut Anders Hatlen created DERBY-6383:
-----------------------------------------

             Summary: dblook gives wrong column list for update trigger that references transition
table
                 Key: DERBY-6383
                 URL: https://issues.apache.org/jira/browse/DERBY-6383
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.10.1.1, 10.9.1.0, 10.8.1.2
            Reporter: Knut Anders Hatlen


I see this problem on 10.8 and higher. To reproduce, create a database with a trigger like
this:

connect 'jdbc:derby:trigdb;create=true';
create table t1(x int, y int);
create table t2(x int, y int);
create trigger tr after update of x on t1 referencing old table as old insert into t2 select
* from old;

Then run dblook on the database, and you'll see the following output:

-- ----------------------------------------------
-- DDL Statements for triggers
-- ----------------------------------------------

CREATE TRIGGER "APP"."TR" AFTER UPDATE OF "X", "Y" ON "APP"."T1" REFERENCING OLD_TABLE AS
OLD FOR EACH STATEMENT insert into t2 select * from old;

Notice that the DDL creates an update trigger for columns X and Y, whereas the original trigger
was defined on column X only.

I see the expected DDL on 10.7.1.1.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message