With multiple statements, all statement handles seem to get closed on commit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Committed
|
High
|
xiu-zhu.zhang |
Bug Description
The following sequence fails with T2 driver:
trafodion@n013 multi]$ java SimpleMultiConn Test with 2 connections...
Connected.
Created test tables.
Auto Commit off.
Insert 1 using stmt1.
[Selva] Select from conn1
Fetch one row
Insert 1 using stmt 2.
[Selva] Select from conn2
Fetch one row
Insert 2 using stmt1.
Insert 2 using stmt2.
[Selva] Fetch second row from conn1
Fetch Second row from conn2
Commit 1 for conn 1.
Commit 2 for conn 2.
Committed.
Select from conn1
1 Moe 100
2 Larry -100
3 Curly 100
4 Moe 100
5 Larry -100
6 Curly 100
6 rows fetched from SampleTable1
Select from conn2
1 Moe 100
2 Larry -100
3 Curly 100
4 Moe 100
5 Larry -100
6 Curly 100
6 rows fetched from SampleTable2
Now trying updates with prepared statements...
Update 1 using pstmt1.
Update 1 using pstmt2.
Update 2 using pstmt1.
Update 2 using pstmt2.
Updates done with prepared statements.
Commit 1 for conn 1.
Commit 2 for conn 2.
Committed.
Select from conn1
SQLException:
*** ERROR[8813] Trying to fetch from a statement that is in the closed state.
SQLState 24000
Error Code -8813
Done.
[trafodion@n013 multi]$
Please contact me if you want the java source for this test. The test name is SimpleMultiConn.
description: | updated |
Changed in trafodion: | |
assignee: | nobody → Pavani Puppala (pavani-puppala) |
status: | New → In Progress |
Changed in trafodion: | |
assignee: | RuoYu Zuo (ruo-yu-zuo) → Pavani Puppala (pavani-puppala) |
Changed in trafodion: | |
status: | In Progress → Fix Committed |
Changed in trafodion: | |
assignee: | Pavani Puppala (pavani-puppala) → xiu-zhu.zhang (xiu-zhu-zhang) |
assignee: | xiu-zhu.zhang (xiu-zhu-zhang) → nobody |
assignee: | nobody → xiu-zhu.zhang (xiu-zhu-zhang) |
status: | Fix Committed → In Progress |
Changed in trafodion: | |
status: | In Progress → Fix Committed |
Changed in trafodion: | |
milestone: | r1.0 → r1.1 |
The problem is because of multiple statements within a connection. So this problem can be reproduced with single connection and multiple statements. T2 driver is sending the wrong statement name to CLI, so CLI is trying to execute a statement that is already is closed state.