db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1539228 - in /db/derby/code/branches/10.9: ./ java/engine/org/apache/derby/impl/sql/compile/ java/testing/org/apache/derbyTesting/functionTests/master/ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/
Date Wed, 06 Nov 2013 03:35:33 GMT
Author: mamta
Date: Wed Nov  6 03:35:32 2013
New Revision: 1539228

URL: http://svn.apache.org/r1539228
Log:
DERBY-6383(Update trigger defined on one column fires on update of other columns)

Backporting to 10.9


Modified:
    db/derby/code/branches/10.9/   (props changed)
    db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out

Propchange: db/derby/code/branches/10.9/
------------------------------------------------------------------------------
  Merged /db/derby/code/branches/10.10:r1539074,1539108

Modified: db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java?rev=1539228&r1=1539227&r2=1539228&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
(original)
+++ db/derby/code/branches/10.9/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
Wed Nov  6 03:35:32 2013
@@ -530,10 +530,9 @@ public class CreateTriggerNode extends D
 			ResultColumn rc;
 			ColumnDescriptor cd;
 			//This is the most interesting case for us. If we are here, 
-			//then it means that the trigger is defined at the row level
-			//and a set of trigger columns are specified in the CREATE
-			//TRIGGER statement. This can only happen for an UPDATE
-			//trigger.
+			//then it means that a set of trigger columns are specified
+			//in the CREATE TRIGGER statement. This can only happen for
+			//an UPDATE trigger.
 			//eg
 			//CREATE TRIGGER tr1 AFTER UPDATE OF c12 ON table1 
 			//    REFERENCING OLD AS oldt NEW AS newt
@@ -593,8 +592,6 @@ public class CreateTriggerNode extends D
 		else
 		{
 			//This is a table level trigger	        
-			//Total Number of columns in the trigger table
-			int numberOfColsInTriggerTable = triggerTableDescriptor.getNumberOfColumns();
 			StringBuffer newText = new StringBuffer();
 			/*
 			** For a statement trigger, we find all FromBaseTable nodes.  If
@@ -639,12 +636,6 @@ public class CreateTriggerNode extends D
 					newText.append(baseTableName).append(" ");
 				}
 				start=tokEndOffset-actionOffset+1;
-				//If we are dealing with statement trigger, then we will read 
-				//all the columns from the trigger table since trigger will be
-				//fired for any of the columns in the trigger table.
-				referencedColInts= new int[numberOfColsInTriggerTable];
-				for (int j=0; j < numberOfColsInTriggerTable; j++)
-					referencedColInts[j]=j+1;
 			}
 			if (start < originalActionText.length())
 			{

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out?rev=1539228&r1=1539227&r2=1539228&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out
Wed Nov  6 03:35:32 2013
@@ -2093,7 +2093,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out?rev=1539228&r1=1539227&r2=1539228&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out
Wed Nov  6 03:35:32 2013
@@ -2093,7 +2093,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out?rev=1539228&r1=1539227&r2=1539228&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out
Wed Nov  6 03:35:32 2013
@@ -2086,7 +2086,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false
@@ -4321,7 +4321,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false
@@ -5039,7 +5039,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out?rev=1539228&r1=1539227&r2=1539228&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out
(original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out
Wed Nov  6 03:35:32 2013
@@ -2086,7 +2086,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false
@@ -4321,7 +4321,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false
@@ -5039,7 +5039,7 @@ E
 T8
 null
 <systemid>
-(1,2)
+null
 select * from oldtable
 true
 false



Mime
View raw message