Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 74221 invoked from network); 10 Jun 2008 18:56:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 18:56:39 -0000 Received: (qmail 93245 invoked by uid 500); 10 Jun 2008 18:56:38 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 93172 invoked by uid 500); 10 Jun 2008 18:56:38 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 93130 invoked by uid 99); 10 Jun 2008 18:56:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 11:56:38 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 18:55:57 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3A6DF234C13B for ; Tue, 10 Jun 2008 11:55:45 -0700 (PDT) Message-ID: <521293871.1213124145238.JavaMail.jira@brutus> Date: Tue, 10 Jun 2008 11:55:45 -0700 (PDT) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3609) Wrong functionality of auto-generated keys support In-Reply-To: <1748789350.1207732404324.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603980#action_12603980 ] Rick Hillegas commented on DERBY-3609: -------------------------------------- The correct behavior (if DatabaseMetaData.supportsGetGeneratedKeys() returns true) is defined in the JDBC3 spec, section 13.6 (Retrieving Auto Generated Keys). > Wrong functionality of auto-generated keys support > -------------------------------------------------- > > Key: DERBY-3609 > URL: https://issues.apache.org/jira/browse/DERBY-3609 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.3.2.1 > Environment: N/A > Reporter: Oleksandr Alesinskyy > Attachments: TestGeneratedKeys.java > > > Currently support for autogeneration key retrieval in JDBC driver (java.sql.Statement) relies on IDENTITY_VAL_LOCAL function, which means that for multi-row INSERT... VALUES statements as well as for INSERT...AS SELECT statement wrong result are returned (key generated of last executed single-row INSERT...VALUES statement or NULL otherwise). While this functionality is documented in the Reference description of IDENTITY_VAL_LOCAL it is not so clearly documented in "autogenerated keys" subchapter of JDBC 3.0 Features (the only vague hint is "Calling ResultSet.getMetaData on the ResultSet object returned by getGeneratedKeys produces a ResultSetMetaData object that is similar to that returned by IDENTITY_VAL_LOCAL."). > Moreover, as far as I understant it diverge from JDBC specification. IMHO or this functionality shal lbe implemented completely, or exception shall be thrown if for given statement functionality is not supported (e.g. "Feature not supported"). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.