From derby-dev-return-80332-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Mon Aug 02 06:23:41 2010 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 83645 invoked from network); 2 Aug 2010 06:23:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Aug 2010 06:23:41 -0000 Received: (qmail 35527 invoked by uid 500); 2 Aug 2010 06:23:41 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 35329 invoked by uid 500); 2 Aug 2010 06:23: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 35322 invoked by uid 99); 2 Aug 2010 06:23:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Aug 2010 06:23:37 +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; Mon, 02 Aug 2010 06:23:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o726NFJY027506 for ; Mon, 2 Aug 2010 06:23:16 GMT Message-ID: <10492374.113281280730195817.JavaMail.jira@thor> Date: Mon, 2 Aug 2010 02:23:15 -0400 (EDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Reopened: (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 ] Kristian Waagan reopened DERBY-4759: ------------------------------------ Bug behavior facts: (was: [Data corruption, Deviation from standard, Wrong query result]) Reopening for classification. > 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.