Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D251A1017E for ; Fri, 21 Feb 2014 08:35:26 +0000 (UTC) Received: (qmail 34207 invoked by uid 500); 21 Feb 2014 08:35:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34012 invoked by uid 500); 21 Feb 2014 08:35:24 -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 33992 invoked by uid 99); 21 Feb 2014 08:35:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Feb 2014 08:35:21 +0000 Date: Fri, 21 Feb 2014 08:35:21 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-4160) getMetaData().getIndexInfo crashes with "ERROR X0Y68: Column 'PARAM1' already exists." 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-4160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908095#comment-13908095 ] ASF subversion and git services commented on DERBY-4160: -------------------------------------------------------- Commit 1570488 from [~knutanders] in branch 'code/trunk' [ https://svn.apache.org/r1570488 ] DERBY-4160: getMetaData().getIndexInfo crashes with "ERROR X0Y68: Column 'PARAM1' already exists." Use a shared code path for adding parameters to SYS.SYSCOLUMNS on the first compilation and subsequent compilations of a meta-data query. Previously, the first compilation took a different code path, but that caused problems if two threads compiled a meta-data query at the same time, and both threads thought they were first. Set a savepoint before attempting to write a stored prepared statement to the system tables in a nested transaction, and roll back to the savepoint if an error happens. This prevents partially stored prepared statements from lying around in the system tables after an error. > getMetaData().getIndexInfo crashes with "ERROR X0Y68: Column 'PARAM1' already exists." > -------------------------------------------------------------------------------------- > > Key: DERBY-4160 > URL: https://issues.apache.org/jira/browse/DERBY-4160 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.4.2.0 > Environment: FreeBSD java 1.6.0, 64-Bit Server VM; DataNucleus JDO > Reporter: ArtemGr > Assignee: Knut Anders Hatlen > Labels: derby_triage10_5_2 > Attachments: D4160.java, d4160-1a.diff > > > The following code in DataNucleus: > rs = conn.getMetaData().getIndexInfo(catalogName, schemaName, tableName, false, > true); > triggers an Exception (http://gist.github.com/95679): > Caused by: java.sql.SQLException: Column 'PARAM1' already exists. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70) > ... 105 more > Caused by: ERROR X0Y68: Column 'PARAM1' already exists. > at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:303) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(DataDictionaryImpl.java:1678) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(DataDictionaryImpl.java:1662) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSParams(DataDictionaryImpl.java:3682) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateSPS(DataDictionaryImpl.java:3830) > at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.updateSYSSTATEMENTS(SPSDescriptor.java:1112) > at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.java:736) > at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.java:642) > at org.apache.derby.impl.sql.compile.ExecSPSNode.generate(ExecSPSNode.java:177) > at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:447) > at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88) > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:794) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(EmbedPreparedStatement.java:128) > ... 99 more -- This message was sent by Atlassian JIRA (v6.1.5#6160)