db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-821) Client driver: Implicitly close exhausted result sets on the server
Date Mon, 23 Jan 2006 19:13:11 GMT
    [ http://issues.apache.org/jira/browse/DERBY-821?page=comments#action_12363717 ] 

Bryan Pendleton commented on DERBY-821:
---------------------------------------

Maybe I'm not understanding your test program properly, but it seems that the result set should
*not* be closed in this case, because the table (and the result set) contain 3 rows, but your
test program only said 'next' once. If your test program actually  said 'next' 3 times, then
I agree, it should be OK to implicitly close the result set and the test should be revised.

In regards to your first comment, I agree: my reading of the DRDA specs is that they *do*
support implicit closing of result sets even when LMTBLKPRC is used, so long as the other
requirements on the result set are met. Here's a quote from page 478 of DRDA V3:

  If the query is non-scrollable and it is at end of data (SQLSTATE 02000), then the target
  SQLAM may close the query implicitly by returning an ENDQRYRM and an SQLCARD to
  the source server, based on the cursor type and the QRYCLSIMP value as specified
  previously on the OPNQRY command.


> Client driver: Implicitly close exhausted result sets on the server

> ---------------------------------------------------------------------
>
>          Key: DERBY-821
>          URL: http://issues.apache.org/jira/browse/DERBY-821
>      Project: Derby
>         Type: Improvement
>   Components: Network Client, Network Server, Performance
>     Versions: 10.2.0.0
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> Forward-only result sets that are exhausted should be implicitly
> closed on the server. This way, ResultSet.close() does not have to
> send an explicit close message generating unnecessary network traffic.
> The DRDA protocol supports this. From the description of OPNQRY (open
> query):
>   The qryclsimp parameter controls whether the target server
>   implicitly closes a non-scrollable query upon end of data (SQLSTATE
>   02000) in association with the cursor type.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message