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 "Yip Ng (JIRA)" <de...@db.apache.org> on 2006/08/01 20:13:17 UTC

[jira] Assigned: (DERBY-1621) Trigger action statement is not recompile when there is a change that would affect it.

     [ http://issues.apache.org/jira/browse/DERBY-1621?page=all ]

Yip Ng reassigned DERBY-1621:
-----------------------------

    Assignee: Yip Ng

> Trigger action statement is not recompile when there is a change that would affect it.
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-1621
>                 URL: http://issues.apache.org/jira/browse/DERBY-1621
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.0.0
>            Reporter: Daniel John Debrunner
>         Assigned To: Yip Ng
>            Priority: Critical
>             Fix For: 10.2.0.0
>
>
> A trigger action statement, such as an INSERT statement is not recompiled when there is some DDL change on the underlying table, such as a CREATE INDEX.
> In the example below a unique index is added to the table (t2) inserted into by the trigger's action statement. When the tirgger fires it does not raise any error (should raise a unique constraint violated error) and does not insert the value into the index. A select from t2 does not show the additional rows in t2 as it is performing an index scan, once the index is dropped the rows appear to the select.
> ij version 10.2
> ij> connect 'jdbc:derby:cs;create=true';
> ij> create table t (i int);
> 0 rows inserted/updated/deleted
> ij> create table t2 (i int);
> 0 rows inserted/updated/deleted
> ij> create trigger tt after insert on t for each statement mode db2sql
> insert into t2 values 1;
> 0 rows inserted/updated/deleted
> ij> insert into t values 1;
> 1 row inserted/updated/deleted
> ij> select * from t2;
> I
> -----------
> 1
> 1 row selected
> ij> create unique index tu on t2(i);
> 0 rows inserted/updated/deleted
> ij> insert into t values 1;
> 1 row inserted/updated/deleted
> ij> select * from t2;
> I
> -----------
> 1
> 1 row selected
> ij> insert into t values 1;
> 1 row inserted/updated/deleted
> ij> select * from t2;
> I
> -----------
> 1
> 1 row selected
> ij> drop index tu;
> 0 rows inserted/updated/deleted
> ij> select * from t2;
> I
> -----------
> 1
> 1
> 1
> 3 rows selected

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Assigned: (DERBY-1621) Trigger action statement is not recompile when there is a change that would affect it.

Posted by Yip Ng <yi...@gmail.com>.
Hmm.. not sure, but I'll dig into it.

On 8/1/06, Kathey Marsden <km...@sbcglobal.net> wrote:
>
> Yip Ng (JIRA) wrote:
>
> >
> >
> >>Trigger action statement is not recompile when there is a change that
> would affect it.
>
> >>--------------------------------------------------------------------------------------
> >>
> >>
> >>
> Is it possible DERBY-1603 is at all related to this bug, where the
> "change"  is changing versions?
> Just a long shot but hoping....
>
>
>

Re: [jira] Assigned: (DERBY-1621) Trigger action statement is not recompile when there is a change that would affect it.

Posted by Kathey Marsden <km...@sbcglobal.net>.
Yip Ng (JIRA) wrote:

>  
>
>>Trigger action statement is not recompile when there is a change that would affect it.
>>--------------------------------------------------------------------------------------
>>
>>    
>>
Is it possible DERBY-1603 is at all related to this bug, where the 
"change"  is changing versions?
Just a long shot but hoping....