Derby
  1. Derby
  2. DERBY-3940

Dropping a column does not drop triggers which mention that column

    Details

    • Urgency:
      Normal
    • Issue & fix info:
      Known fix, Repro attached, Workaround attached

      Description

      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.

      1. Triggers.java
        2 kB
        Rick Hillegas
      2. dropColumnWithTrigger.sql
        2 kB
        Rick Hillegas

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development