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

Mamta A. Satoor commented on DERBY-6387:
----------------------------------------

Knut, I noticed following failure in IBM's internal test runs and was wondering 
if it might be related to your changes to dblook_test
*** Start: dblook_test jdk1.6.0 derbyall:derbytools 2013-12-18 19:59:43 ***
6537a6538
> CREATE TRIGGER "APP"."TR15" AFTER UPDATE ON "APP"."T1" REFERENCING NEW_TABLE 
> AS NEW FOR EACH STATEMENT select * from sys.systables natural join 
> sys.sysschemas where exists(select * from new where x > 100)
6539d6539
< CREATE TRIGGER "APP"."TR15" AFTER UPDATE ON "APP"."T1" REFERENCING NEW_TABLE 
AS NEW FOR EACH STATEMENT select * from sys.systables natural join 
sys.sysschemas where exists(select * from new where x > 100)
Test Failed.
*** End:   dblook_test jdk1.6.0 derbyall:derbytools 2013-12-18 20:00:22 ***


> Incorrect ordering of triggers in dblook
> ----------------------------------------
>
>                 Key: DERBY-6387
>                 URL: https://issues.apache.org/jira/browse/DERBY-6387
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.10.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.11.0.0
>
>         Attachments: create-triggers.sql, d6387-1a.diff
>
>
> The order in which triggers fire, is partly determined by the order in which 
> they are created.
> See here:
> http://db.apache.org/derby/docs/10.10/ref/rrefsqlj43125.html
> |   When multiple triggers are defined for the same database event for
> |   the same table for the same trigger time (before or after), triggers
> |   are fired in the order in which they were created.
> And here:
> SQL:2003, part 2, section 4.38.1 General description of triggers:
> |   The order of execution of a set of triggers is ascending by value of
> |   their timestamp of creation in their descriptors, such that the
> |   oldest trigger executes first.
> Since the order of creation matters, dblook should generate CREATE TRIGGER 
> statements in an order that preserves the original order of execution.
> dblook currently generates CREATE TRIGGER statements in the order returned by 
> a SELECT query against SYS.SYSTRIGGERS. The SELECT query does not have an 
> ORDER BY clause, so it is not guaranteed to return the rows in a specific 
> order.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to