db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r159041 - in incubator/derby/code/trunk/java: drda/org/apache/derby/impl/drda/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/ testing/org/apache/derbyTesting/functionTests/suites/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/
Date Fri, 25 Mar 2005 17:57:47 GMT
Author: kmarsden
Date: Fri Mar 25 09:57:43 2005
New Revision: 159041

URL: http://svn.apache.org/viewcvs?view=rev&rev=159041
Log:
Checkin for client setTransactionIsolation 
If no isolation level is in the section number sent from the client, 
use current isolation level.
					
Kathey Marsden

Added:
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out   (with props)
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation_sed.properties   (with props)
Modified:
    incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java?view=diff&r1=159040&r2=159041
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java (original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java Fri Mar 25 09:57:43 2005
@@ -484,7 +484,8 @@
 		// save current prepare iso level
 		int saveIsolationLevel = -1;
 		boolean isolationSet = false;
-		if (pkgnamcsn !=null)
+		if (pkgnamcsn !=null && 
+			isolationLevel != Connection.TRANSACTION_NONE)
 		{
 			saveIsolationLevel = database.getPrepareIsolation();
 			database.setPrepareIsolation(isolationLevel);

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out?view=diff&r1=159040&r2=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/setTransactionIsolation.out Fri Mar 25 09:57:43 2005
@@ -11,7 +11,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH100C1
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -52,7 +52,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH300C1
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -93,7 +93,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH200C2
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -134,7 +134,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH400C1
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -201,7 +201,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH100C1
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -242,7 +242,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH300C1
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -283,7 +283,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH200C2
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -354,7 +354,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH200C2
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -394,7 +394,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH200C2
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -434,7 +434,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH200C2
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -474,7 +474,7 @@
 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 -----
 Statement Name: 
-	SQL_CURSH200C2
+	null
 Statement Text: 
 	select * from t1
 Parse Time: 0
@@ -564,3 +564,4 @@
 con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
 insert into t1copy (select * from t1)
 A lock could not be obtained within the time requested
+FAIL: setTransactionIsolation() did not throw exception with open hold cursor

Added: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out?view=auto&rev=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out (added)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out Fri Mar 25 09:57:43 2005
@@ -0,0 +1,675 @@
+Creating table...
+done creating table and inserting data.
+*** testIsolation. makeNewStatements =true
+*** Test with no lock timeouts ***
+***testLevelsAndPrintStatistics sql:select * from t1 makenewStatements:true
+con.prepareStatement(select * from t1)
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read uncommitted isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at repeatable read isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read committed isolation level using instantaneous share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at serializable isolation level using share table locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+***testLevelsAndPrintStatistics sql:insert into t1copy (select * from t1) makenewStatements:true
+con.prepareStatement(insert into t1copy (select * from t1))
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+null
+*** Test with lock timeouts on everything but read uncommitted***
+conn :insert into t1 values(4,'Forth Hello') (no commit)
+***testLevelsAndPrintStatistics sql:select * from t1 makenewStatements:true
+con.prepareStatement(select * from t1)
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read uncommitted isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at repeatable read isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+con.prepareStatement(select * from t1)
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read committed isolation level using instantaneous share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+con.prepareStatement(select * from t1)
+select * from t1
+A lock could not be obtained within the time requested
+***testLevelsAndPrintStatistics sql:insert into t1copy (select * from t1) makenewStatements:true
+con.prepareStatement(insert into t1copy (select * from t1))
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+A lock could not be obtained within the time requested
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+A lock could not be obtained within the time requested
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+con.prepareStatement(insert into t1copy (select * from t1))
+insert into t1copy (select * from t1)
+A lock could not be obtained within the time requested
+*** testIsolation. makeNewStatements =false
+*** Test with no lock timeouts ***
+***testLevelsAndPrintStatistics sql:select * from t1 makenewStatements:false
+con.prepareStatement(select * from t1)
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read uncommitted isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at repeatable read isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read committed isolation level using instantaneous share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at serializable isolation level using share table locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+***testLevelsAndPrintStatistics sql:insert into t1copy (select * from t1) makenewStatements:false
+con.prepareStatement(insert into t1copy (select * from t1))
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+insert into t1copy (select * from t1)
+null
+*** Test with lock timeouts on everything but read uncommitted***
+conn :insert into t1 values(4,'Forth Hello') (no commit)
+***testLevelsAndPrintStatistics sql:select * from t1 makenewStatements:false
+con.prepareStatement(select * from t1)
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read uncommitted isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at repeatable read isolation level using share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+select * from t1
+1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Statement Name: 
+	null
+Statement Text: 
+	select * from t1
+Parse Time: 0
+Bind Time: 0
+Optimize Time: 0
+Generate Time: 0
+Compile Time: 0
+Execute Time: 0
+Begin Compilation Timestamp : null
+End Compilation Timestamp : null
+Begin Execution Timestamp : null
+End Execution Timestamp : null
+Statement Execution Plan Text: 
+Table Scan ResultSet for T1 at read committed isolation level using instantaneous share row locking chosen by the optimizer
+Number of opens = 1
+Rows seen = 0
+Rows filtered = 0
+Fetch Size = 16
+	constructor time (milliseconds) = 0
+	open time (milliseconds) = 0
+	next time (milliseconds) = 0
+	close time (milliseconds) = 0
+scan information: 
+	Bit set of columns fetched=All
+	Number of columns fetched=2
+	Number of pages visited=0
+	Number of rows qualified=0
+	Number of rows visited=0
+	Scan type=heap
+	start position: 
+null	stop position: 
+null	qualifiers:
+None
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+select * from t1
+A lock could not be obtained within the time requested
+***testLevelsAndPrintStatistics sql:insert into t1copy (select * from t1) makenewStatements:false
+con.prepareStatement(insert into t1copy (select * from t1))
+con.setTransactionIsolation(TRANSACTION_READ_UNCOMMITTED:1)
+con.getTransactionIsolation() =TRANSACTION_READ_UNCOMMITTED:1
+insert into t1copy (select * from t1)
+null
+con.setTransactionIsolation(TRANSACTION_REAPEATABLE_READ:4)
+con.getTransactionIsolation() =TRANSACTION_REAPEATABLE_READ:4
+insert into t1copy (select * from t1)
+A lock could not be obtained within the time requested
+con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2)
+con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2
+insert into t1copy (select * from t1)
+A lock could not be obtained within the time requested
+con.setTransactionIsolation(TRANSACTION_SERIALIZABLE:8)
+con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
+insert into t1copy (select * from t1)
+A lock could not be obtained within the time requested
+EXPECTED EXCEPTION SQLSTATE:X0X03 Invalid transaction state - held cursor requires same isolation level

Propchange: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/setTransactionIsolation.out
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out?view=diff&r1=159040&r2=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/setTransactionIsolation.out Fri Mar 25 09:57:43 2005
@@ -672,3 +672,4 @@
 con.getTransactionIsolation() =TRANSACTION_SERIALIZABLE:8
 insert into t1copy (select * from t1)
 A lock could not be obtained within the time requested
+EXPECTED EXCEPTION SQLSTATE:X0X03 Invalid transaction state - held cursor requires same isolation level

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude?view=diff&r1=159040&r2=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNetClient.exclude Fri Mar 25 09:57:43 2005
@@ -6,4 +6,4 @@
 lang/scrollCursors2.java
 jdbcapi/batchUpdate.java
 jdbcapi/statementJdbc20.java
-jdbcapi/setTransactionIsolation.java
+#jdbcapi/setTransactionIsolation.java

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant?view=diff&r1=159040&r2=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant Fri Mar 25 09:57:43 2005
@@ -39,6 +39,7 @@
 secureUsersldap_sed.properties
 searchclob.txt
 setTransactionIsolation_derby.properties
+setTransactionIsolation_sed.properties
 short.txt
 parameterMetaDataJdbc30_app.properties
 users.sql

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java?view=diff&r1=159040&r2=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation.java Fri Mar 25 09:57:43 2005
@@ -52,7 +52,6 @@
 		Connection conn = ij.startJBMS();
 		
 		createAndPopulateTable(conn);
-
 		runTests(conn);
 		conn.rollback();
 		conn.close();
@@ -107,6 +106,7 @@
 		   // on already prepared statements for network server
 		   conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
 		   testIsolation(conn, false);
+		   testSetTransactionIsolationInHoldCursor(conn);
 
 		} catch (SQLException sqle) {
 			System.out.print("FAIL:");
@@ -168,7 +168,29 @@
 
 	}
 	
-
+	/**
+	 *   Call setTransactionIsolation with holdable cursor open?
+	 */
+	public static void testSetTransactionIsolationInHoldCursor(Connection conn) 
+	{
+		try {
+			
+			PreparedStatement ps = conn.prepareStatement("SELECT * from TAB1");
+			ResultSet rs = ps.executeQuery();
+			rs.next();
+			// setTransactionIsolation should fail because we have 
+			// a holdable cursor open
+			conn.setTransactionIsolation(java.sql.Connection.TRANSACTION_SERIALIZABLE);
+		} catch (SQLException se)
+		{
+			System.out.println("EXPECTED EXCEPTION SQLSTATE:" + 
+							   se.getSQLState() + " " +
+							   se.getMessage());
+			return;
+		}
+		System.out.println("FAIL: setTransactionIsolation() did not throw exception with open hold cursor");
+	}
+	
 	public static void testLevelsAndPrintStatistics(Connection con, String sql,
 													boolean makeNewStatements)
 		throws SQLException

Added: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation_sed.properties
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation_sed.properties?view=auto&rev=159041
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation_sed.properties (added)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation_sed.properties Fri Mar 25 09:57:43 2005
@@ -0,0 +1,9 @@
+# Filters and substitutes for SED
+# Multiple patterns for DELETE: comma separated
+#   delete=pattern1,pattern2,...,patternn
+# No commas can be allowed in the patterns.
+#
+# Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
+#   substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
+# No commas or semicolons can be allowed in the patterns/subsitutes.
+substitute=SQL_CUR.*;null

Propchange: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/setTransactionIsolation_sed.properties
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message