db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1101) ResultSet.getHoldabilty will return incorrect value when the ResultSet is obtained from a procedure call
Date Mon, 13 Mar 2006 15:10:36 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1101?page=comments#action_12370189 ] 

Daniel John Debrunner commented on DERBY-1101:

Thanks for following up on this Knut, you said:

> Since the ResultSet object was produced by a Statement internally in
> the stored procedure, and not by the Statement which called the
> procedure, I believe the current implementation of
> EmbedResultSet.getStatement() is correct. 

I'm not sure, for four reasons:

   1) It's impossible to match this behaviour in client mode.

   2) Logically the statement that created the JDBC ResultSet is the one that executed
    the CALL statement. I think the model defined by the SQL standard is that the
    JDBC ResultSet created within the procedure is turned into a SQL result set
    by the database engine and then the client JDBC creates a JDBC ResultSet from 
     the SQL result set. It just so happens that Derby can omit the conversion into
     an internal ResultSet.

   3) Once Derby supports SQL procedures, and a JDBC ResultSet is returned
    then the only Statement that makes sense is the one that invoked the CALL procedure.

    4) JDBC 4.0 - Why was the method ResultSet.getHoldability added? It can only be because
     it can return a different value to rs.getStatement().getResultSetHoldability().

> ResultSet.getHoldabilty will return incorrect value when the ResultSet is obtained from
a procedure call
> --------------------------------------------------------------------------------------------------------
>          Key: DERBY-1101
>          URL: http://issues.apache.org/jira/browse/DERBY-1101
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions:
>     Reporter: Daniel John Debrunner
>     Priority: Minor
>  Attachments: testderby1101.java
> EmbedResultSet40.getHoldability returns the holdability of the statement returned by
> When a ResultSet is created by a procedure call, its holdability may not match the holdability
of the Statement  that called the procedure, which is probably what ResultSet.getStatement()
should return.
> This may not be exposed as a bug yet, but I think this method should be directly obtaining
the holdability of the ResultSet using the Activation.getResultSetHoldability() method, rather
than through a Statement. Seems a safer approach.

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