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 "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2014/02/17 23:05:20 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13903538#comment-13903538 ] 

Myrna van Lunteren commented on DERBY-3940:
-------------------------------------------

Because we don't actually have a change for this to backport, I'm marking it as derby_reject_backport_10.8 so it doesn't show up in my query.

> 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_backport_reject_10_8, derby_triage10_5_2
>             Fix For: 10.10.1.4, 10.11.0.0
>
>         Attachments: Triggers.java, dropColumnWithTrigger.sql
>
>
> 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 was sent by Atlassian JIRA
(v6.1.5#6160)