Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 4711 invoked from network); 1 Aug 2010 09:20:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Aug 2010 09:20:42 -0000 Received: (qmail 73955 invoked by uid 500); 1 Aug 2010 09:20:42 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73692 invoked by uid 500); 1 Aug 2010 09:20:40 -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 73682 invoked by uid 99); 1 Aug 2010 09:20:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 09:20:38 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Aug 2010 09:20:37 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o719KHoC015149 for ; Sun, 1 Aug 2010 09:20:17 GMT Message-ID: <19164351.106521280654417661.JavaMail.jira@thor> Date: Sun, 1 Aug 2010 05:20:17 -0400 (EDT) From: "RobertoC (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4759) incoherence on IDENTITY_VAL_LOCAL after INSERT via SELECT In-Reply-To: <33050829.106281280652856687.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] RobertoC updated DERBY-4759: ---------------------------- Comment: was deleted (was: Ignore this bug. This is a "feature": :(( http://db.apache.org/derby/docs/10.6/ref/ref-single.html#rrefidentityvallocal) > incoherence on IDENTITY_VAL_LOCAL after INSERT via SELECT > --------------------------------------------------------- > > Key: DERBY-4759 > URL: https://issues.apache.org/jira/browse/DERBY-4759 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.6.1.0 > Environment: Win XP - JDK 1.6.0_20 > Reporter: RobertoC > Priority: Blocker > > wrong IDENTITY_VAL_LOCAL() after "SELECT ... INSERT" (see below example) > -- replicable on derby 10.6.1000000.938214 > CREATE TABLE email2folder ( > id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY NOT NULL, > idemail bigint NOT NULL, > idfolder integer NOT NULL > ); > INSERT INTO email2folder(idemail,idfolder) VALUES(10,20); > INSERT INTO email2folder(idemail,idfolder) VALUES(30,40); > -- WARN: disconnect from DB and reconnect > insert into email2folder(idemail,idfolder) > select idemail,idfolder from email2folder where id<2; > -- expected: 1 row inserted > -- obtained: 1 row inserted (OK) > > VALUES IDENTITY_VAL_LOCAL(); > -- expected result: 3 > -- obtained result: NULL (ERROR!) > -- note: if a previous "standard INSERT" is executed before INSERT via SELECT, the IDENTITY_VAL report the previous > -- generated PK, possible producing data-incoherence in the application execution -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.