db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn propchange: r1166313 - svn:log
Date Wed, 07 Sep 2011 23:41:26 GMT
Author: mamta
Revision: 1166313
Modified property: svn:log

Modified: svn:log at Wed Sep  7 23:41:26 2011
------------------------------------------------------------------------------
--- svn:log (original)
+++ svn:log Wed Sep  7 23:41:26 2011
@@ -1,7 +1,8 @@
-I am commiting change which include engine changes and upgrade test addition. Will add tests
as another checkin
+DERBY-5044 ALTER TABLE DROP COLUMN will not detect triggers defined on other tables with
their trigger action using the column being dropped
+
+This commit includes engine changes and upgrade test additions. Will add more junit tests
as another checkin
 
 Following is a brief description of the engine changes.
 For the table being altered, we will go through the dependency system to determine all the
triggers that depend on the table being altered(this will include triggers defined directly
on the table being altered and the triggers defined on other tables but using the table being
altered in their trigger action plan.) This is done by first finding all the objects that
depend on the table being altered. We are only interested in SPSDescriptors from that list
of dependent objects. For each of these dependent SPSDescriptor, we want to find if they are
defined for a trigger action SPS. If yes, then the trigger must be dependent on the table
being altered. For each of these dependent triggers, we dropped their trigger descriptor from
datadictionary, regenerate and rebind it's trigger action SPS and then add the trigger descriptor(with
upto date version of internal representation of trigger action) back to datadictionary.During
the rebind of trigger action, we will get exception if th
 e trigger depends on the column being altered. If so, then if the alter table drop column
is being done in restrict mode, then we will throw an exception that column can't be dropped
because it has dependent object. If the drop column was issued in cascade mode, then we will
drop the dependent triggers.
 
 As part of this commit, I have removed the code which used to go directly through all the
triggers defined on the table being altered and dropping, rebinding and recreating them. This
is because the new code going through the dependency system should find all the triggers which
would be impacted by drop column, no matter whether the triggers are defined on the table
being altered or triggers defined on other tables but using table being altered in their trigger
action.) DERBY-5120 could have prevented us from catching all the triggers defined on the
table being altered through the dependency system because of missing dependency between trigger
action sps and trigger table but that has been fixed in 10.9 and 10.8 so we should be fine.
I have run all the existing junit suites and derbyall and they ran fine.
-


Mime
View raw message