db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Wilder (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-213) ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network Server
Date Thu, 02 Jun 2005 18:07:09 GMT
     [ http://issues.apache.org/jira/browse/DERBY-213?page=all ]

Philip Wilder updated DERBY-213:

    Attachment: IRCTranscript_June2_2005.txt

Just to mix things up a bit this morning I'll be doing the Summary for the IRC chat Kathey
and I had at IRC://irc.freenode.net/#derby June 2, 9:00 a.m. PST about DERBY-213.

* Talked about instances QRYCLSIMP in the DRDA Technical standard Version 3, Volume 1
* Implemented a few small changes including the removal of the QRYCLSIMP value from DRDA statment
to no observed ill effect.
* Noted a bug in the Database.getDRDAStatement() method and assigned Philip to open a jira
* Discussed the merits of a closeImplicitly() method vs. the use of getQryclsimp() in conjunction
with additional logic eventually rejecting closeImplictly().
* Decided that 
if (getQryclsimp() != CodePoint.QRYCLSIMP_NO ... 
should be 
if (getQryclsimp() == CodePoint.QRYCLSIMP_YES ... 
effectively changing the default setting to NOT close the ResultSet object implicitly unless
the client specifies that the server should do so with a QRYCLSIMP_YES value.
* Discovered that implementing this change had no effect on ResultSet implicit close behavior.
Tested client server interaction while ignoring client input (overriding it with QRYCLSIMP_NO),
same result.
* Discussed tips on how I might better trace DRDA protocol behavior. Specifically through
the use of the tracefile=trace.out in your connection url and derby.drda.debug in your derby.properties.
* Concluded meeting and assigned tasks for the next meeting to be held June 3, 5:00 a.m. PST
/ 9:00 a.m. AST

We also decided that we would try this format for all future chat transcripts, posting the
transcript to Jira as a file and providing the summary as a comment. Feel free to express
any opinions on this chosen format.

> ResultSet.next() after last row of FORWARD_ONLY cursor throws an SQL Exception with Network
> --------------------------------------------------------------------------------------------------
>          Key: DERBY-213
>          URL: http://issues.apache.org/jira/browse/DERBY-213
>      Project: Derby
>         Type: Bug
>   Components: Network Server
>     Versions:
>     Reporter: Kathey Marsden
>  Attachments: Client.java, Create.java, IRCTranscript_June2_2005.txt, Server.java, resultset.java
> Network Server closes the result set if ResultSet.next() is 
> called after the last row of the result set.  The test code 
> below throws the following exception.
> SQLState:   null
> Severity: -99999
> Message:  Invalid operation: result set closed
> com.ibm.db2.jcc.am.SqlException: Invalid operation: result set 
> closed
>         at 
> com.ibm.db2.jcc.am.ResultSet.checkForClosedResultSet(ResultSet.j
> ava:3419)
>         at 
> com.ibm.db2.jcc.am.ResultSet.nextX(ResultSet.java:290)
>         at 
> com.ibm.db2.jcc.am.ResultSet.next(ResultSet.java:277)
>         at AfterLast.test(AfterLast.java:75)
>         at AfterLast.main(AfterLast.java:32)
> stmt.executeUpdate("CREATE  TABLE TAB ( I INT)");
> stmt.executeUpdate("INSERT INTO TAB VALUES(1)");
> stmt.executeUpdate("INSERT INTO TAB VALUES(2)");
> String sql ="SELECT * from tab";		
> ps = conn.prepareStatement(sql);
> ResultSet rs = ps.executeQuery();
> System.out.println(sql);
> while (rs.next())
> System.out.println(rs.getInt(1));
> try {
> 	System.out.println("one more next");
> 	rs.next();
> 		}
>     catch (Exception e)
> 		{
> 		System.out.println("FAIL: next should return false not throw 
> exception");
> 		e.printStackTrace();
> 		}

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message