db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers
Date Tue, 18 Nov 2008 14:13:44 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Hillegas updated DERBY-3948:
---------------------------------

    Attachment: derby-3948-01-aa-beforeTriggers.diff

Attaching derby-3948-01-aa-beforeTriggers.diff. This enforces the rule that generated columns
can't be mentioned in the NEW variables of actions fired by BEFORE triggers. Tests are running
now.

Touches the following files:

M      java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java

Adds method to look for the offending references.


M      java/engine/org/apache/derby/loc/messages.xml
M      java/shared/org/apache/derby/shared/common/reference/SQLState.java

Adds an error message to flag this forbidden condition.


M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsHelper.java

Adds regression tests. Also changes a couple pre-existing test cases because they violated
this rule.


> Don't allow references to generated columns in the NEW transition variables of triggered
actions of BEFORE triggers
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3948
>                 URL: https://issues.apache.org/jira/browse/DERBY-3948
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.5.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-3948-01-aa-beforeTriggers.diff
>
>
> Thanks to Dag for finding this restriction in the SQL Standard, part 2, section 11.39,
SR 12 c) I see this provision:
>    12) If BEFORE is specified, then:
>      :
>      c) The <triggered action> shall not contain a <field reference> that
>      references a field in the new transition variable corresponding to a
>      generated column of T. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message