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 2013/09/13 18:12:52 UTC

[jira] [Resolved] (DERBY-3940) Dropping a column does not drop triggers which mention that column

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

Rick Hillegas resolved DERBY-3940.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.11.0.0
                   10.10.1.3

Thanks for verifying that the bug was fixed in 10.10.1.1. I've verified that the trigger is also dropped by the ALTER TABLE DROP COLUMN command on the 10.11 trunk. Resolving this issue to note that it is fixed in the trunk and at the head of the 10.10 branch.
                
> Dropping a column does not drop triggers which mention that column
> ------------------------------------------------------------------
>
>                 Key: DERBY-3940
>                 URL: https://issues.apache.org/jira/browse/DERBY-3940
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.4.2.1, 10.5.1.1
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_5_2
>             Fix For: 10.10.1.3, 10.11.0.0
>
>         Attachments: dropColumnWithTrigger.sql, Triggers.java
>
>
> Put an INSERT trigger on a table and mention a column in the trigger. Then drop that column from the table. If you drop the column with RESTRICT semantics, you don't get an objection. Both CASCADE and RESTRICT drop the column. However, the trigger remains in both cases. After that, INSERTs into the table fail because the trigger can't find the dropped column. The workaround is to manually drop the trigger either before or after dropping the column. I will attach a test case.

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