From derby-dev-return-88147-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Fri Jun 3 14:42:31 2011 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 EC0806E3A for ; Fri, 3 Jun 2011 14:42:31 +0000 (UTC) Received: (qmail 73266 invoked by uid 500); 3 Jun 2011 14:42:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73240 invoked by uid 500); 3 Jun 2011 14:42:31 -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 73233 invoked by uid 99); 3 Jun 2011 14:42:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 14:42:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 14:42:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 60F6BF267B for ; Fri, 3 Jun 2011 14:41:47 +0000 (UTC) Date: Fri, 3 Jun 2011 14:41:47 +0000 (UTC) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Message-ID: <517001721.65806.1307112107394.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <714328354.50084.1306534607418.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-5249) A table created with 10.0.2.1 with constraints cannot be dropped with 10.5 due to NullPointerException with insane build or ASSERT FAILED Failed to find sharable conglomerate descriptor for index conglomerate with sane build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-5249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathey Marsden updated DERBY-5249: ---------------------------------- Attachment: derby-5249_diff.txt Attaching a patch for this issue derby-5249_diff.txt. The change is to change the check when ignoreThis is set to compare not only getUUID() but also getConglomerateName(). That way we can handle the pre DERBY-655 cases where the UUID might be the same. Also in the patch are some fixes needed to the test that showed up after the the test progressed further. Running tests now. > A table created with 10.0.2.1 with constraints cannot be dropped with 10.5 due to NullPointerException with insane build or ASSERT FAILED Failed to find sharable conglomerate descriptor for index conglomerate with sane build > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-5249 > URL: https://issues.apache.org/jira/browse/DERBY-5249 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.5.3.0 > Reporter: Kathey Marsden > Assignee: Kathey Marsden > Attachments: derby-5249_diff.txt, my10db.zip, repro_create.sql, repro_create.sql > > > In 10.0.2.1 there was some bug that caused a duplicate entry in sys.sysconglomerates. > After running the attached repro_create.sql with 10.0.2.1, you will see two rows returned instead of one with: > select c.constraintname, c.constraintid, cong.conglomerateid, cong.conglomeratename from sys.sysconglomerates cong, sys.syskeys k, sys.sysconstraints c where c.constraintname = 'PK_RS' and c.constraintid =k.constraintid and k.conglomerateid = cong.conglomerateid ; > I am not sure what practical impact this has with 10.0 as you can still drop the table s.rs with that version. > On connecting to the database with 10.5, either soft or hard upgrade with 10.5.3.2 - 1103924 > DROP TABLE S.RS fails with: > Caused by: java.sql.SQLException: Java exception: 'ASSERT FAILED Failed to find > sharable conglomerate descriptor for index conglomerate # 785: org.apache.derby. > shared.common.sanity.AssertFailure'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExc > eptionFactory.java:45) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransport > AcrossDRDA(SQLExceptionFactory40.java:119) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLE > xceptionFactory40.java:70) > ... 17 more > Caused by: org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED Fa > iled to find sharable conglomerate descriptor for index conglomerate # 785 > at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(Sanit > yManager.java:162) > at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(Sanit > yManager.java:147) > at org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor.describeS > haredConglomerate(ConglomerateDescriptor.java:638) > at org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor.drop(Cong > lomerateDescriptor.java:428) > at org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.drop(Constr > aintDescriptor.java:738) > at org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction.dropCo > nstraint(DDLSingleTableConstantAction.java:144) > at org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction.dropCo > nstraint(DDLSingleTableConstantAction.java:107) > at org.apache.derby.impl.sql.execute.DropTableConstantAction.dropAllCons > traintDescriptors(DropTableConstantAction.java:315) > at org.apache.derby.impl.sql.execute.DropTableConstantAction.executeCons > tantAction(DropTableConstantAction.java:222) > at org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.ja > va:61) > at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Generi > cPreparedStatement.java:416) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPre > paredStatement.java:297) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedState > ment.java:1235) > ... 10 more > and with an insane build with a NullPointerException: > java.lang.NullPointerException > at > org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor.drop(Unknown > Source) > at > org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor.drop(Unknown > Source) > at > org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction.dropConst > raint(Unknown Source) > at > org.apache.derby.impl.sql.execute.DDLSingleTableConstantAction.dropConst > raint(Unknown Source) > at > org.apache.derby.impl.sql.execute.DropTableConstantAction.dropAllConstra > intDescriptors(Unknown Source) > at > org.apache.derby.impl.sql.execute.DropTableConstantAction.executeConstan > tAction(Unknown Source) > at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown > Source) > at > org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown > Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown > Source) > Still need to figure out the exact versions affected, when the dup row was fixed, and when the drop stopped working. > To reproduce connect to a database with 10.0.2.1 > (can be accessed at http://svn.apache.org/repos/asf/db/derby/jars/10.0.2.1) > run the attached script repro_create.sql; > connect with the latest on the trunk or 10.5 branch > DROP TABLE S.RS; > The table will not drop. The work around is to drop the table with the old version 10.0.2.1 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira