T2 and T4 drivers return different errors if fetch/get data is issued when cursor is after last row

Bug #1369853 reported by Aruna Sadashiva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
High
xiu-zhu.zhang

Bug Description

JDBC T2 and T4 drivers return different errors if we try to fetch rows when cursor is beyond resultset or if resultset is empty.

T2 returns:
Exception...The cursor is after last row, which could be due to the result set containing no rows, or all rows have been retrieved.

T4 returns:
Exception...The message id: invalid_row
org.trafodion.jdbc.t4.HPT4Exception: The message id: invalid_row

Rao thinks this maybe bcoz T2 is not optimized and its still going to server.

Changed in trafodion:
milestone: r0.9 → r1.0
Jian Jin (jian-jin)
Changed in trafodion:
assignee: Rao Kakarlamudi (rao-kakarlamudi) → Kevin Xu (kai-hua-xu)
milestone: r1.0 → r1.1
Changed in trafodion:
milestone: r1.1 → r1.2
Revision history for this message
Kevin Xu (kai-hua-xu) wrote :

There is a method TrafT4ResultSet.isBeforeFirst() which allows you get the cursor status, while error 29050 occurs. Since T4 and T2 are different from each other on logic, they may have different errors. I don’t think it’s a good idea to unify the error messages. Currently, T4 has 188 error messages at least while T2 has 89 messages on Java side. By the way, T4 only have source code in Java while T2 contains it in both Java and C++.

Revision history for this message
Kevin Xu (kai-hua-xu) wrote :

T4 and T2 are different projects. no need fixes here. will be closed if there is no other comments.

Revision history for this message
Aruna Sadashiva (aruna-sadashiva) wrote :

Hi Kevin,

This bug was filed mainly bcoz Rao felt that the t2 code may not be optimized, as mentioned in the description. Was any investigation done to verify and fix this?

Also, both t2/t4 are implementation of jdbc standard, it will be nice if both drivers behaved similarly.

Thanks.
-Aruna

Kevin Xu (kai-hua-xu)
Changed in trafodion:
assignee: Kevin Xu (kai-hua-xu) → xiu-zhu.zhang (xiu-zhu-zhang)
Revision history for this message
Aruna Sadashiva (aruna-sadashiva) wrote :

Testcase is attached.

Changed in trafodion:
status: New → In Progress
Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.