db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4015) Regression in Statement.getGeneratedKeys()
Date Mon, 12 Jan 2009 20:42:01 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663084#action_12663084

Kristian Waagan commented on DERBY-4015:

Kathey wrote:
A couple things in the javadoc struck me.
First is this note:
    Note:If the columns which represent the auto-generated keys were not specified, the JDBC
driver implementation will determine the columns which best represent the auto-generated keys.

Does this mean that for the emptyArray and nullParam cases we should return the generated
When I read this, I thought of the methods where you specify that you want the generated keys,
but not which. One such example is "prepareStatement(String sql, int autoGeneratedKeys) ".

It seems wrong to me to return the keys for emptyArray and nullParam, but I agree it isn't
very clear from reading the spec. I also checked the JDBC 3.0 Tutorial book quickly (feel
free to have a second look!), but didn't find anything helpful. If you want everything, shouldn't
you either specify them all or use the method I mentioned above?
Also, could it be that Derby's implementation takes a few shortcuts because we only allow
one identity column per table?

I would let emptyArray return an empty result set and maybe have nullParam throw an exception,
but again we have several choices...

> Regression in Statement.getGeneratedKeys()
> ------------------------------------------
>                 Key: DERBY-4015
>                 URL: https://issues.apache.org/jira/browse/DERBY-4015
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions:
>         Environment: I am currently running on Mac 10.5 with Java 5. However, it has
also been observed on other platforms in our automated build such as SUSE Linux and Windows
with Java 5.
>            Reporter: Brandon Smith
>            Priority: Critical
>         Attachments: Behavior-Matrix.jpg, derby-, derby-,
> The application of both DERBY-2653 and DERBY-3426 in the seems to have created
a regression in how the network JDBC client implementation of PreparedStatement.getGeneratedKeys()
behaves as compared to Note that there wasn't a change in behavior between versions
for the embedded implementation. However, in general there are behavior discrepancies between
the network and client implementations for this method.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message