db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2653) Expose existing auto-generated key functionality through more JDBC APIs in Derby Client.
Date Tue, 19 Feb 2008 03:50:36 GMT

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

A B commented on DERBY-2653:

Thanks for the patch, Kathey.

>From a quick reading it looks like client will throw an error if the specified columnNames
array has length zero, is that correct?  If so, I wonder if it would make sense to treat a
0-length columnNames array the same as a NO_GENERATED_KEYS argument?

I only mention it because in EmbedStatement.java we treat a 0-length array to mean NO_GENERATED_KEYS.
 But having said that, it looks like we don't check the array size in EmbedConneciton.java
(we just check whether or not it's null), which I think means that a 0-length array *will*
return generated keys (if there are any) for the Connection.prepareStatement() API...hmm.
 The fact that EmbedStatement and EmbedConnection show different behavior is probably a bug
(new Jira), but in either case embedded will execute without throwing an error.

I realize that embedded and client are going to have different behaviors with the array arguments,
per your earlier comments, but in the specific case of a 0-length array, it seems like it
should be possible to keep embedded and client in sync.  Do you think it would be worth it
to do so?

> Expose existing auto-generated key functionality through more JDBC APIs in Derby Client.
> ----------------------------------------------------------------------------------------
>                 Key: DERBY-2653
>                 URL: https://issues.apache.org/jira/browse/DERBY-2653
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>         Environment: Runnning with Derby Client.
>            Reporter: A B
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: derby-2653_columnNames_diff.txt, derby-2653_columnNames_diff.txt,
> See DERBY-2631 for details.  Desired functionality is the same as for DERBY-2631, except
that this issue is specifically for Derby Client (DERBY-2631 only addressed embedded mode).

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

View raw message