Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 71070 invoked from network); 25 May 2009 19:58:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 May 2009 19:58:55 -0000 Received: (qmail 71687 invoked by uid 500); 25 May 2009 19:59:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 71619 invoked by uid 500); 25 May 2009 19:59:07 -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 71611 invoked by uid 99); 25 May 2009 19:59:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 19:59:07 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 19:59:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9AA8D234C004 for ; Mon, 25 May 2009 12:58:45 -0700 (PDT) Message-ID: <1658932421.1243281525620.JavaMail.jira@brutus> Date: Mon, 25 May 2009 12:58:45 -0700 (PDT) From: "Eranda Sooriyabandara (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Assigned: (DERBY-4244) ALTER TABLE Sanity ASSERT in add column with autocommit off In-Reply-To: <645723311.1243089826244.JavaMail.jira@brutus> 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-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eranda Sooriyabandara reassigned DERBY-4244: -------------------------------------------- Assignee: Eranda Sooriyabandara > ALTER TABLE Sanity ASSERT in add column with autocommit off > ----------------------------------------------------------- > > Key: DERBY-4244 > URL: https://issues.apache.org/jira/browse/DERBY-4244 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.6.0.0 > Reporter: Bryan Pendleton > Assignee: Eranda Sooriyabandara > Priority: Minor > > While working with Eranda on DERBY-4187, I stumbled across an apparent ALTER TABLE bug. > Here's a script which reproduces the problem for me: > autocommit off; > create table t0(c1 int not null constraint p1 primary key); > alter table t0 add column c1 int; > alter table t0 add column c2 int not null default 0 primary key; > alter table t0 add column c2 int not null default 0; > The "autocommit off" is crucial; otherwise the problem does not reproduce. > Here's the detailed assertion failure: > 2009-05-23 15:01:17.436 GMT Thread[main,5,main] (XID = 146), (SESSIONID = 1), (DATABASE = brydb), (DRDAID = null), Failed Statement is: alter table t0 add column c2 int not null default 0 > org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED column_id = 1format_ids.length = 2format_ids = [I@1321f5 > at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162) > at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147) > at org.apache.derby.impl.store.access.heap.Heap.addColumn(Heap.java:418) > at org.apache.derby.impl.store.access.RAMTransaction.addColumnToConglomerate(RAMTransaction.java:618) > at org.apache.derby.impl.sql.execute.AlterTableConstantAction.addNewColumnToTable(AlterTableConstantAction.java:1325) > at org.apache.derby.impl.sql.execute.AlterTableConstantAction.executeConstantAction(AlterTableConstantAction.java:449) > Here's the relevant section of Heap.java: > if (column_id != format_ids.length) > { > if (SanityManager.DEBUG) > SanityManager.THROWASSERT( > "column_id = " + column_id + > "format_ids.length = " + format_ids.length + > "format_ids = " + format_ids); > throw(StandardException.newException( > SQLState.HEAP_TEMPLATE_MISMATCH, > new Long(column_id), > new Long(this.format_ids.length))); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.