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 "Knut Anders Hatlen (JIRA)" <de...@db.apache.org> on 2006/03/13 12:07:39 UTC
[jira] Commented: (DERBY-1101) ResultSet.getHoldabilty will return
incorrect value when the ResultSet is obtained from a procedure call
[ http://issues.apache.org/jira/browse/DERBY-1101?page=comments#action_12370153 ]
Knut Anders Hatlen commented on DERBY-1101:
-------------------------------------------
Dan Debrunner wrote:
> EmbedResultSet40.getHoldability returns the holdability of the
> statement returned by ResultSet.getStatement(). 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.
Are you saying that there is a problem with
EmbedResultSet.getStatement()? It doesn't return what you say it
"probably should return".
For instance, if you have
stmt.execute("call mystoredprocedure(1,2,3)");
ResultSet rs = stmt.getResultSet();
then
stmt != rs.getStatement()
The javadoc for ResultSet.getStatement() says:
Retrieves the Statement object that produced this ResultSet
object. If the result set was generated some other way, such as by a
DatabaseMetaData method, this method may return null.
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.
> 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.
Actually, at one point I tried to use Activation to get the result set
holdability, but since TemporaryRowHolderResultSet.getActivation() has
a THROWASSERT to make sure it is not called, I used getStatement()
instead.
> 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: 10.2.0.0
> Reporter: Daniel John Debrunner
> Priority: Minor
>
> EmbedResultSet40.getHoldability returns the holdability of the statement returned by ResultSet.getStatement().
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira