Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 54841 invoked from network); 4 Mar 2008 17:50:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 17:50:58 -0000 Received: (qmail 35073 invoked by uid 500); 4 Mar 2008 17:50:48 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 35027 invoked by uid 500); 4 Mar 2008 17:50:48 -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 35009 invoked by uid 99); 4 Mar 2008 17:50:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 09:50:47 -0800 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; Tue, 04 Mar 2008 17:50:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 83E04234C08C for ; Tue, 4 Mar 2008 09:49:42 -0800 (PST) Message-ID: <759700363.1204652982538.JavaMail.jira@brutus> Date: Tue, 4 Mar 2008 09:49:42 -0800 (PST) From: "Mike Matrigali (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3330) provide support for unique constraint over keys that include one or more nullable columns. In-Reply-To: <8759495.1200598893963.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Matrigali updated DERBY-3330: ---------------------------------- Description: Allow unique constraint over keys which include one or more nullable fields. Prior to this change Derby only supported unique constraints on keys that included no nullable columns. The new constraint will allow unlimited inserts of any key with one more null columns, but will limit insert of keys with no null columns to 1 unique value per table. There is no change to existing or newly created unique indexes on null columns (as opposed to unique constraints on null columns). Also there is no change to existing or newly created constraints on keys with no nullable columns. was:Allow unique constraint over nullable field. Right now derby support unique constraint only over not null columns. Derby Info: [Patch Available, Release Note Needed] (was: [Release Note Needed, Patch Available]) Summary: provide support for unique constraint over keys that include one or more nullable columns. (was: provide support for unique constraint over nullable columns) revision 633560 checked into trunk: DERBY-3330 committed on behalf of Anurag Shekhar Committed modified versions of patch derby-3330v13.diff and db2Compatibility-v2.diff. The modifications are mostly changed and/or added comments along with some code formatting changes to make the new code match the surrounding code style. This checkin adds the functionality to create unique constraints on a key that contains one or more nullable columns. This constraint will all inserts of all keys that contain one or more columns with the null value. All keys that contain no columns with null values are constrained to be unique in the table. The underlying implementation for this new type of unique constraint uses the existing btree non-unique index with a small modification to do checking at insert time to provide the described unique behavior for null and non-null keys. The sorter has also been modified to provide this support for creating the index. > provide support for unique constraint over keys that include one or more nullable columns. > ------------------------------------------------------------------------------------------ > > Key: DERBY-3330 > URL: https://issues.apache.org/jira/browse/DERBY-3330 > Project: Derby > Issue Type: New Feature > Components: Store > Affects Versions: 10.4.0.0 > Environment: all > Reporter: Anurag Shekhar > Assignee: Anurag Shekhar > Attachments: BTreeController.diff, db2Compatibility-v2.diff, db2Compatibility.diff, derby-3330-testcase.diff, derby-3330.diff, derby-3330v10.diff, derby-3330v11.diff, derby-3330v12.diff, derby-3330v13.diff, derby-3330v2.diff, derby-3330v3.diff, derby-3330v4.diff, derby-3330v5.diff, derby-3330v6.diff, derby-3330v7.diff, derby-3330v8.diff, derby-3330v9.diff, derbyall_report.txt, FunctionalSpec_DERBY-3330-V2.html, FunctionalSpec_DERBY-3330.html, UniqueConstraint_Implementation.html, UniqueConstraint_Implementation_V2.html, UniqueConstraint_Implementation_V3.html > > > Allow unique constraint over keys which include one or more nullable fields. Prior to this change Derby only supported unique constraints on keys that included no nullable columns. The new constraint will allow unlimited inserts of any key with one more null columns, but will limit insert of keys with no null columns to 1 unique value per table. > There is no change to existing or newly created unique indexes on null columns (as opposed to unique constraints on null columns). Also there is no change to existing or newly created constraints on keys with no nullable columns. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.