Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 41642 invoked from network); 22 Sep 2006 05:26:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Sep 2006 05:26:05 -0000 Received: (qmail 53483 invoked by uid 500); 22 Sep 2006 05:26:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 53450 invoked by uid 500); 22 Sep 2006 05:26:04 -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 53440 invoked by uid 99); 22 Sep 2006 05:26:04 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Sep 2006 22:26:04 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=UPPERCASE_25_50 Received: from [209.237.227.198] ([209.237.227.198:34529] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id CF/3B-06791-BE373154 for ; Thu, 21 Sep 2006 22:26:03 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E86524190CE for ; Fri, 22 Sep 2006 05:22:23 +0000 (GMT) Message-ID: <11141810.1158902543949.JavaMail.jira@brutus> Date: Thu, 21 Sep 2006 22:22:23 -0700 (PDT) From: "Chad Loder (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-1854) SYSCS_COMPRESS_TABLE corrupts table with a single column which is both a primary key and a foreign key In-Reply-To: <32171291.1158278783521.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1854?page=comments#action_12436741 ] Chad Loder commented on DERBY-1854: ----------------------------------- Hm, that last comment didn't format correctly. We locally applied "derby-1854-andrew-10.1.diff" against our 10.1 working copy and it worked OK. Cheers > SYSCS_COMPRESS_TABLE corrupts table with a single column which is both a primary key and a foreign key > ------------------------------------------------------------------------------------------------------ > > Key: DERBY-1854 > URL: http://issues.apache.org/jira/browse/DERBY-1854 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.1.3.0, 10.1.3.1 > Environment: Reproduced on Linux, Win2k, and WinXP running JDK 1.4.2.x > Reporter: Chad Loder > Assigned To: Suresh Thalamati > Priority: Critical > Fix For: 10.2.1.0, 10.3.0.0 > > Attachments: derby-1854-andrew-10.1.diff, derby-1854.diff, derby-1854_v1.diff > > > Running the following short SQL script from ij will cause an error "ERROR XSAI2: The conglomerate (817) requested does not exist.". It appears that the SYSCS_COMPRESS_TABLE function corrupts tables that have a single column which is both a primary key and a foreign key. > connect 'jdbc:derby:/testdb;create=true'; > CREATE TABLE users ( > user_id INT NOT NULL GENERATED BY DEFAULT AS IDENTITY, > user_login VARCHAR(255) NOT NULL, > PRIMARY KEY (user_id)); > CREATE TABLE admins ( > user_id INT NOT NULL, > PRIMARY KEY (user_id), > CONSTRAINT admin_uid_fk FOREIGN KEY (user_id) REFERENCES users (user_id)); > > INSERT INTO users (user_login) VALUES('TEST1'); > INSERT INTO admins VALUES (VALUES IDENTITY_VAL_LOCAL()); > CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'ADMINS', 0); > SELECT * from admins; -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira