Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 85811 invoked from network); 25 Aug 2006 20:18:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Aug 2006 20:18:36 -0000 Received: (qmail 83282 invoked by uid 500); 25 Aug 2006 20:18:36 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 83190 invoked by uid 500); 25 Aug 2006 20:18:35 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 83181 invoked by uid 99); 25 Aug 2006 20:18:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 13:18:35 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 13:18:34 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D015D41000C for ; Fri, 25 Aug 2006 20:15:23 +0000 (GMT) Message-ID: <24412750.1156536923849.JavaMail.jira@brutus> Date: Fri, 25 Aug 2006 13:15:23 -0700 (PDT) From: "Yip Ng (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1621) Trigger action statement is not recompile when there is a change that would affect it. In-Reply-To: <28522061.1154449335257.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1621?page=comments#action_12430612 ] Yip Ng commented on DERBY-1621: ------------------------------- Mamta, yes, I included the testcases for all the related duplicate jiras into this jira. Thanks for porting this to 10.2, Rick. > 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.1.0 > Reporter: Daniel John Debrunner > Assigned To: Yip Ng > Priority: Critical > Fix For: 10.2.1.0 > > Attachments: derby1621trunkdiff01.txt, derby1621trunkdiff02.txt, derby1621trunkdiff03.txt, derby1621trunkdiff04.txt, derby1621trunkstat01.txt, derby1621trunkstat02.txt, derby1621trunkstat03.txt, derby1621trunkstat04.txt > > > 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