Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 638614DDC for ; Thu, 23 Jun 2011 23:55:11 +0000 (UTC) Received: (qmail 49542 invoked by uid 500); 23 Jun 2011 23:55:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 49514 invoked by uid 500); 23 Jun 2011 23:55:11 -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 49507 invoked by uid 99); 23 Jun 2011 23:55:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 23:55:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 23:55:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 988DD42CFA5 for ; Thu, 23 Jun 2011 23:54:47 +0000 (UTC) Date: Thu, 23 Jun 2011 23:54:47 +0000 (UTC) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Message-ID: <219755996.35040.1308873287621.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <966181018.34756.1308866448306.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-5294) Triggers created prior to 10.9 release will continue to read all the columns from trigger table even after database has been upgraded to 10.9 and higher MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-5294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mamta A. Satoor updated DERBY-5294: ----------------------------------- Affects Version/s: (was: 10.7.1.1) 10.9.0.0 > Triggers created prior to 10.9 release will continue to read all the columns from trigger table even after database has been upgraded to 10.9 and higher > -------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-5294 > URL: https://issues.apache.org/jira/browse/DERBY-5294 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.9.0.0 > Reporter: Mamta A. Satoor > > With DERBY-1482 (which went in 10.9 codeline), triggers will read only the columns needed by the triggering sql and firing triggers. But this applies only to triggers created in 10.9 and higher. Any triggers created prior to 10.9 will not be able to take advantage of DERBY-1482 because those triggers do not keep the information about the trigger action columns. Currently, the users will have to drop and recreate the triggers which use the REFERENCING CLAUSE and were created prior to 10.9 to take advantage of DERBY-1482. > The alternative to manual drop and recreate of such triggers can be explored as part of this jira. Couple options are > 1)UPDATE sql should detect that the trigger does not have information about the trigger action columns and hence it should make the trigger collect that information. > 2)At the time of upgrade, when we mark all the SPSes invalid, detect the triggers which do not have the information about the trigger action columns and make those triggers collect that information. > 3)Enhance ALTER TABLE COMPRESS to detect the triggers which do not have the information about the trigger action columns and make those triggers collect that information. With this option, users will still have to manually do ALTER TABLE COMPRESS to fix the triggers but atleast they won't have to get the original trigger definitions and drop and recreate the triggers using those original trigger definitions. > 10.9 currently does not have central place where the trigger will go and collect the information about trigger action columns. We do have code in ALTER TABLE DROP COLUMN to collect the trigger action column info but it will probably better to have such a code in TriggerDescriptor so it can be used by the approach taken to fix this jira. > Note that without the fix for this jira, the triggers created prior to 10.9 will work just fine after upgrade to 10.9 and higher but they will not be able to prevent reading of columns that are not necessary for the triggering sql and firing triggers -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira