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

Kathey Marsden commented on DERBY-4015:
---------------------------------------

In the javadoc for the executeUpdate
http://java.sun.com/javase/6/docs/api/java/sql/Statement.html#executeUpdate(java.lang.String,%20java.lang.String[])

    SQLException - if a database access error occurs, this method is called on 
a closed Statement, the SQL statement returns a ResultSet object, or the second 
argument supplied to this method is not a String array whose elements are valid 
column names 

So it looks like the exception should occur on the executeUpdate(), not 
getGeneratedKeys() for the emptyArray, nullArray, and nullParam cases anyway.

For  the fakeColumn case, the column supplied is actually a valid column 
(albeit not an identity column), so perhaps it should return an empty result 
set?  For a non-existent column it should also throw an exception on 
executeUpdate too.   Of course we currently can't detect this in the client 
driver but it would be good to decide the correct behavior and then worry about 
implementation later.




> 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.

Reply via email to