db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-3940) Dropping a column does not drop triggers which mention that column
Date Mon, 17 Feb 2014 22:05:20 GMT

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

Mime
View raw message