You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2014/03/25 13:35:15 UTC

[jira] [Commented] (DERBY-6383) Update trigger defined on one column fires on update of other columns

    [ https://issues.apache.org/jira/browse/DERBY-6383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13946457#comment-13946457 ] 

Rick Hillegas commented on DERBY-6383:
--------------------------------------

The release note says that a regression was introduced by DERBY-6383. Shouldn't that be some older issue like DERBY-4874?

Also, in the "Incompatibilities with Previous Release" section, I think that the following phrase…

for columns not specified CREATE TRIGGER... AFTER UPDATE.. OF columns-list

…would read better as

for columns not specified in the column list of the "CREATE TRIGGER... AFTER UPDATE.. OF" clause

Thanks,
-Rick

> Update trigger defined on one column fires on update of other columns
> ---------------------------------------------------------------------
>
>                 Key: DERBY-6383
>                 URL: https://issues.apache.org/jira/browse/DERBY-6383
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.4, 10.8.1.2, 10.9.1.0, 10.10.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Mamta A. Satoor
>              Labels: backport_reject_10_6
>             Fix For: 10.7.1.4, 10.8.3.3, 10.9.2.2, 10.10.1.4, 10.11.0.0
>
>         Attachments: DERBY6383_patch1_diff.txt, DERBY6383_patch2_diff.txt, DERBY6383_patch3_diff.txt, d6383.sql, derby_for_Embedded_40Changes10_7testTriggers.log, derby_for_Embedded_40Changes10_9testDisposableStatisticsExplicit.log, error-stacktrace_for_Embedded_40Changes10_7testTriggers.out, error-stacktrace_for_Embedded_40Changes10_9testDisposableStatisticsExplicit.out, releaseNote.html, releaseNote.html, runall.out
>
>
> 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.2#6252)