[
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 keys?
-----
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: 10.3.3.0
> 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-10.3.2.1-tests.zip,
> derby-10.3.3.0-tests.zip, Derby4015.java
>
>
> The application of both DERBY-2653 and DERBY-3426 in the 10.3.3.0 seems to
> have created a regression in how the network JDBC client implementation of
> PreparedStatement.getGeneratedKeys() behaves as compared to 10.3.2.1. 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.