[
https://issues.apache.org/jira/browse/DERBY-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662915#action_12662915
]
Kristian Waagan commented on DERBY-4015:
----------------------------------------
Seems to me that there are several issues to consider here (I haven't checked
the current status):
o Ignore array/argument if the SQL is not an insert statement (or not another
type of statement returning a generated key).
o In cases where there are no generated keys to return, an empty result set
should be returned (not null).
o If Derby doesn't support the functionality, SQLFeatureNotSupportedException
should be thrown.
o Make embedded and client driver consistent.
It is not quite clear to me what to do if the column index or column name is
invalid, but it seems wise to thrown an SQLExcecption.
A few questions:
a) Is a generated key column always an integer column?
b) Can a generated key column be any generated column, or must it be GENERATED
{ ALWAYS | BY DEFAULT } AS IDENTITY?
c) Derby supports only one identity column. Does this mean that if two or more
column names/indexes are specified, an SQLFeatureNotSupportedException should
be thrown?
> 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
>
>
> 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.