You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2008/11/14 21:41:44 UTC

[jira] Created: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers

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


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.


[jira] Commented: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648743#action_12648743 ] 

Rick Hillegas commented on DERBY-3948:
--------------------------------------

Tests ran cleanly for me. Committed derby-3948-01-aa-beforeTriggers.diff at subversion revision 718707.

> 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.


[jira] Closed: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas closed DERBY-3948.
--------------------------------


> 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.1.1
>            Reporter: Rick Hillegas
>             Fix For: 10.5.1.1
>
>         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.


[jira] Updated: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-3948:
--------------------------------------

    Fix Version/s: 10.5.0.0

> 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
>             Fix For: 10.5.0.0
>
>         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.


[jira] Resolved: (DERBY-3948) Don't allow references to generated columns in the NEW transition variables of triggered actions of BEFORE triggers

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas resolved DERBY-3948.
----------------------------------

    Resolution: Fixed

> 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.