You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2005/10/06 18:20:49 UTC

[jira] Commented: (DERBY-506) Implement Statement.setQueryTimeout in the Client Driver

    [ http://issues.apache.org/jira/browse/DERBY-506?page=comments#action_12331512 ] 

Kathey Marsden commented on DERBY-506:
--------------------------------------

I think the EXCSQLSET is a good way to go but would  prefer to see it made as a call with setQueryTimeout  when the JDBC call is made instead of being resent with each Statement execution. The SET statement would then need to send the package name and section number for the Statement.  

The trouble that I see with this approach as things stand now is that I think  the statement table currently includes the package name, section number, and consistency token.  The consistency token is non-ascii and so would cause problems with our SET statement, but I really think that the statement lookup could be changed to not include the consistiency token.  I  think that the package name and section number are unique for each open statement, but this should be verified.


This mechanism could also be used for setMaxRows.


> Implement Statement.setQueryTimeout in the Client Driver
> --------------------------------------------------------
>
>          Key: DERBY-506
>          URL: http://issues.apache.org/jira/browse/DERBY-506
>      Project: Derby
>         Type: New Feature
>   Components: JDBC
>     Versions: 10.1.1.0
>     Reporter: Oyvind Bakksjo
>     Assignee: Oyvind Bakksjo
>  Attachments: DERBY-506_PRE.diff
>
> Currently, the Embedded Driver supports Statement.setQueryTimeout(), but the Client Driver does not. The Client Driver should be enhanced and match the Embedded Driver.
> For this, we need to transfer the timeout value from the client to the server, preferably without a separate round-trip. I have some loose thoughts on how to do this:
> * If the client has set a timeout value for a statement, prepend the (DRDA) EXCSQLSTT command with an EXCSQLSET command which contains the timeout value; conceptually a "SET STATEMENT TIMEOUT <seconds>" (this does not mean that we need to extend the Derby grammar; only the Network Server needs to understand this DRDA EXCSQLSET command).
> * In DRDAConnThread.parseEXCSQLSETobjects() on the server side, recognize the "SET STATEMENT TIMEOUT" text, parse the timeout value and remember it for the coming EXCSQLSTT command. Do NOT invoke executeUpdate() with the SET statement [see note below].
> * In DRDAConnThread.parseEXCSQLSTT(), check if a timeout value has been set; if so, use it (by setting the timeout value on the server-side Statement object before calling execute/executeQuery). 

-- 
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