You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2008/02/26 00:20:47 UTC

svn commit: r631038 - in /db/derby/code/branches/10.2/java: engine/org/apache/derby/impl/sql/conn/ testing/org/apache/derbyTesting/functionTests/master/

Author: kmarsden
Date: Mon Feb 25 15:20:45 2008
New Revision: 631038

URL: http://svn.apache.org/viewvc?rev=631038&view=rev
Log:
DERBY-3093  Intermittent transaction failure caused by internal duplicate savepoint name for triggers

port from trunk revision 588202

Contributed by James F. Adams


Modified:
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_JSR169.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_XA.out

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java?rev=631038&r1=631037&r2=631038&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java Mon Feb 25 15:20:45 2008
@@ -109,14 +109,13 @@
 		this.lcc = lcc;
 		this.tc = tc;
 
-		internalSavePointName = "ISSP" + hashCode();
-
 		if (SanityManager.DEBUG)
 		{
 			SanityManager.ASSERT((lcc != null),
 					"Failed to get language connection context");
 		}
 
+        internalSavePointName = lcc.getUniqueSavepointName();
 	}
 
     /**

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_JSR169.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_JSR169.out?rev=631038&r1=631037&r2=631038&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_JSR169.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_JSR169.out Mon Feb 25 15:20:45 2008
@@ -79,8 +79,8 @@
 Test41b - Rollback to a savepoint, then try to rollback savepoint created after that savepoint
 Expected Exception is SAVEPOINT, s2 does not  exist or is not active in the current transaction.
 Test42 - Rollback/commit the transaction, then try to use savepoint from that transaction
-Expected Exception is SAVEPOINT, SAVEPT5 does not  exist or is not active in the current transaction.
 Expected Exception is SAVEPOINT, SAVEPT6 does not  exist or is not active in the current transaction.
+Expected Exception is SAVEPOINT, SAVEPT7 does not  exist or is not active in the current transaction.
 Test43 - Release and reuse a savepoint name
 Expected Exception is A SAVEPOINT with the passed name already exists in the current transaction.
 Test 45 reuse savepoint name after rollback - should not work
@@ -91,11 +91,11 @@
 Expected Exception is ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
 Expected Exception is ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
 Test 47 multiple tests for getSavepointId()
-8
 9
 10
 11
 12
+13
 Test 48 No nested SQL savepoints allowed.
 Following SQL savepoint will fail because we are trying to nest it inside JDBC savepoint
 Expected Exception is The maximum number of savepoints has been reached. 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_XA.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_XA.out?rev=631038&r1=631037&r2=631038&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_XA.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/savepointJdbc30_XA.out Mon Feb 25 15:20:45 2008
@@ -78,8 +78,8 @@
 Test41b - Rollback to a savepoint, then try to rollback savepoint created after that savepoint
 Expected Exception is SAVEPOINT, s2 does not  exist or is not active in the current transaction.
 Test42 - Rollback/commit the transaction, then try to use savepoint from that transaction
-Expected Exception is SAVEPOINT, SAVEPT5 does not  exist or is not active in the current transaction.
 Expected Exception is SAVEPOINT, SAVEPT6 does not  exist or is not active in the current transaction.
+Expected Exception is SAVEPOINT, SAVEPT7 does not  exist or is not active in the current transaction.
 Test43 - Release and reuse a savepoint name
 Expected Exception is A SAVEPOINT with the passed name already exists in the current transaction.
 Test 45 reuse savepoint name after rollback - should not work
@@ -90,11 +90,11 @@
 Expected Exception is ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
 Expected Exception is ResultSet not open. Operation 'next' not permitted. Verify that autocommit is OFF.
 Test 47 multiple tests for getSavepointId()
-8
 9
 10
 11
 12
+13
 Test 48 No nested SQL savepoints allowed.
 Following SQL savepoint will fail because we are trying to nest it inside JDBC savepoint
 Expected Exception is The maximum number of savepoints has been reached.