Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
10.3.1.4
-
Normal
-
Release Note Needed, Repro attached
Description
A trigger registers a dependency in the Dependency Manager for those columns which cause the firing of the trigger, but does not register a dependency on tables and columns which are used in the body of the trigger. This means that the trigger may unexpectedly become invalid due to a change to one of those tables and columns in its body, and the user may be surprised that Derby did not warn them of this problem when the underlying table/column change was made.
An example of this problem is as follows:
create table t1 (c1 int);
create table t2 (c2 int);
create trigger tr1 after update of c1 on t1 for each row mode db2sql insert into t2 (c2) values (1);
With this set of definitions, Derby will warn/prevent the user about changes to table t1 and column c1, but will not warn the user about changes to table t2 and column c2. If the user drops or renames t2 or c2, the trigger will then give an error the next time it fires.
It seems like it would be an improvement for the trigger to record this dependency on table t2 and column c2.
Attachments
Attachments
Issue Links
- incorporates
-
DERBY-3940 Dropping a column does not drop triggers which mention that column
- Closed
-
DERBY-4887 ALTER TABLE DROP COLUMN leaves the dependent trigger invalid rather than drop it
- Closed
- is related to
-
DERBY-6684 Failure in testDERBY5120NumRowsInSydependsForTrigger when upgrading from 10.11.1.0 to trunk
- Closed
-
DERBY-6420 Clarify how DROP statements work on trigger dependencies
- Closed
- relates to
-
DERBY-4681 Dropping a column in the table drops the views that use this table
- Open
-
DERBY-1632 During revoke privilege, Derby does not look for replacement privilege for the dependent objects and simply drops the dependent objects. This is not SQL compliant and should be fixed.
- Open
-
DERBY-1782 When a privilege is revoked at table level, Derby should only drop objects that require that particular privilege and not all the objects that require some form of privilege on that table.
- Open
-
DERBY-1490 Provide ALTER TABLE RENAME COLUMN functionality
- Closed
-
DERBY-534 Support use of the WHEN clause in CREATE TRIGGER statements
- Closed