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 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 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 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 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 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 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 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 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 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 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 A lock could not be obtained within the time requested con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2) con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2 con.prepareStatement(select * from t1) 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(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 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 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 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 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 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 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 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 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 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 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 A lock could not be obtained within the time requested con.setTransactionIsolation(TRANSACTION_READ_COMMITTED:2) con.getTransactionIsolation() =TRANSACTION_READ_COMMITTED:2 select * from t1 A lock could not be obtained within the time requested 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 count=2, setTransactionIsolation() commits