db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-3940) Dropping a column does not drop triggers which mention that column
Date Fri, 13 Sep 2013 09:19:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13766351#comment-13766351
] 

Knut Anders Hatlen commented on DERBY-3940:
-------------------------------------------

By the way, I ran the repro with 10.10.1.1 and noticed that it no longer behaved as described.
This had changed:

- ALTER TABLE DROP COLUMN still succeeded, but now with the following warning: {{WARNING 01502:
The trigger T_DC_6_PRIM_TRIG_AFTER_INSERT_ROW_TRIGGER on table T_DC_6_PRIM has been dropped.}}
- The trigger actually got dropped, so the follow-up INSERT no longer failed.

Does this mean the bug reported here is fixed and the issue can be closed?
                
> 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
>         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

Mime
View raw message