db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1509434 - in /db/derby/code/branches/10.8: ./ java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
Date Thu, 01 Aug 2013 21:28:06 GMT
Author: kmarsden
Date: Thu Aug  1 21:28:06 2013
New Revision: 1509434

URL: http://svn.apache.org/r1509434
Log:
DERBY-5736  NullPointerException in GenericTriggerExecutor.executeSPS() caused by OutOfMemoryError

merge revision  1335418 from trunk to 10.8
Contributed by Knut Anders Hatlen


Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1335418

Modified: db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java?rev=1509434&r1=1509433&r2=1509434&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
(original)
+++ db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
Thu Aug  1 21:28:06 2013
@@ -203,6 +203,10 @@ public abstract class GenericTriggerExec
 				** trigger executor needs to ensure that the current active SC 
 				** is associated with the SPS, so that it is cleaning up the 
 				** right statement context in LCC. 
+                **
+                ** It is also possible that the error has already been handled
+                ** on a lower level, especially if the trigger re-enters the
+                ** JDBC layer. In that case, the current SC will be null.
 				**    
 				** When the active SC is cleaned up, the TEC will be removed
 				** from LCC and the SC object will be popped off from the LCC 
@@ -213,7 +217,7 @@ public abstract class GenericTriggerExec
 				StatementContext sc = lcc.getStatementContext();
 				
 				/* make sure that the cleanup is on the new SC */
-				if (active_sc != sc) 
+				if (sc != null && active_sc != sc)
 				{
 					sc.cleanupOnError(e);
 				}



Mime
View raw message