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 A012810639 for ; Thu, 19 Sep 2013 07:51:23 +0000 (UTC) Received: (qmail 24522 invoked by uid 500); 19 Sep 2013 07:51:15 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 22829 invoked by uid 500); 19 Sep 2013 07:51:00 -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 22039 invoked by uid 99); 19 Sep 2013 07:50:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Sep 2013 07:50:53 +0000 Date: Thu, 19 Sep 2013 07:50:53 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-534) Support use of the WHEN clause in CREATE TRIGGER statements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-534: ------------------------------------- Attachment: derby-534-02-a-refactor.diff Attaching derby-534-02-a-refactor.diff which performs a small refactoring of the trigger execution logic. It moves some common logic from StatementTriggerExecutor and RowTriggerExecutor to GenericTriggerExecutor so that it is not duplicated. The refactoring also fixes two problems with the original logic: - the before and after result sets were left open if the WHEN clause of a statement trigger returned false - a row trigger that fired multiple times in a single statement would create a new PreparedStatement for the WHEN clause each time instead of reusing it All the regression tests ran cleanly. > Support use of the WHEN clause in CREATE TRIGGER statements > ----------------------------------------------------------- > > Key: DERBY-534 > URL: https://issues.apache.org/jira/browse/DERBY-534 > Project: Derby > Issue Type: Improvement > Components: SQL > Reporter: Kristian Waagan > Assignee: Knut Anders Hatlen > Priority: Minor > Labels: derby_triage10_11 > Attachments: derby-534-01-a-syntax.diff, derby-534-02-a-refactor.diff, parser.diff, WhenClause.html, WhenClause.html > > > Support use of the WHEN clause in CREATE TRIGGER statements. The clause is described in the SQL standard (2003) in chapter "11.39 " under "". > There are traces in the code that suggests some work has been done on this earlier. If anyone knows something about this, please add a comment to this issue. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira