With multiple statements, all statement handles seem to get closed on commit

Bug #1395212 reported by Aruna Sadashiva on 2014-11-21
6
This bug affects 1 person
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
Pavani Puppala (pavani-puppala) wrote :

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.

Changed in trafodion:
assignee: Pavani Puppala (pavani-puppala) → RuoYu Zuo (ruo-yu-zuo)
Changed in trafodion:
assignee: RuoYu Zuo (ruo-yu-zuo) → Pavani Puppala (pavani-puppala)

This problem was first noticed with multiple connections, but also happens with multiple statements. Changed title to avoid confusion.

summary: - With multiple connections and statements, all statement handles seem to
- get closed on commit
+ With multiple statements, all statement handles seem to get closed on
+ commit
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
xiu-zhu.zhang (xiu-zhu-zhang) wrote :

I am remodifing it according on discuss result with kevin and Ruo-Yu on today.
Tomorrow I will test it along with this line and resubmit it as quickly as possible.

xiu-zhu.zhang (xiu-zhu-zhang) wrote :

This bug has been reviewing by reviewer.

Changed in trafodion:
status: In Progress → Fix Committed
Jian Jin (jian-jin) on 2015-03-05
Changed in trafodion:
milestone: r1.0 → r1.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers