db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4015) Regression in Statement.getGeneratedKeys()
Date Tue, 13 Jan 2009 20:23:00 GMT

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

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

I decided to look at the JCC/DB2 behavior. With JCC 3.5 I get the following output for the
Derby4015 program.

emptyArray test (new String[] { })
1

fakeColumn test: (new String[] { "value" })
100

nullArray test: (new String[] { null })
Caught exception SQLSTATE=42703 message=DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=NULL,
DRIVER=3.57.38
(An undefined column, attribute, or parameter name was detected.)

nullParam test (null)
3

So for emptyArray and nullParam  it actually returns the generated value.  For the non-generated
column it returns the non-generated value inserted there which is interesting. If I pass a
column name that does not exist for the fakeColumn test I get the 42703 exception.

It would be interesting to know what other databases do.


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


Mime
View raw message