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 065BA10F52 for ; Fri, 28 Feb 2014 16:42:22 +0000 (UTC) Received: (qmail 35410 invoked by uid 500); 28 Feb 2014 16:42:21 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 35385 invoked by uid 500); 28 Feb 2014 16:42:20 -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 35375 invoked by uid 99); 28 Feb 2014 16:42:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 16:42:20 +0000 Date: Fri, 28 Feb 2014 16:42:20 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6387) Incorrect ordering of triggers in dblook 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-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915962#comment-13915962 ] ASF subversion and git services commented on DERBY-6387: -------------------------------------------------------- Commit 1572994 from mikem@apache.org in branch 'code/branches/10.10' [ https://svn.apache.org/r1572994 ] DERBY-6387: Incorrect ordering of triggers in dblook backported change #1551940. backport required some manual merge as the key query had changed in multiple ways on the trunk. Fix was to just add the "order by" by hand to the existing 10.10 query. Order the triggers by the CREATIONTIMESTAMP column so that dblook produces a script that recreates the triggers in the same order as they were originally created. > 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: Mike Matrigali > 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.5#6160)