db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3330) provide support for unique constraint over nullable columns
Date Thu, 28 Feb 2008 12:07:52 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Anurag Shekhar updated DERBY-3330:

    Attachment: derby-3330v11.diff

Description of patch (derby-3330v11.diff) 

Now the backing index for unique constraint, if all 
participating columns are not null able, will be a unique index.
For now its not possible to set columns as null able after 
creating unique constraint (DERBY-3456 addresses this). 

I have removed IndexDescriptorImpl_10_3 and handling 
additional attribute the way Dan has recommend. 

I am able to run junit tests without any failure.

derbyall harness tests has two failure
1. lang/db2Compatibility.sql
I have attached a separate diff (db2Compatibility.diff) to update the out files.
I am not sure if we should continue to call this test as db2Compatibility as this 
test is not ensuring compatibility anymore (able to create unique constraint 
over null able fields)

This failure was because of a missing class file in derbytools.jar 
(org.apache.derby.impl.tools.run). I am getting this problem in a 
fresh workspace too. So It might be something to do with my 
build environment and not the patch.

I have modified following files in harness test

1. org/apache/derbyTesting/functionTests/tests/lang/subqueryFlattening.sql
2. org/apache/derbyTesting/functionTests/master/subqueryFlattening.out

I have removed the additional test for unique constraint over null able field. 
This creation was supposed to fail and the output query tree was based on no
additional constraint. After allowing unique constraint over null able field 
an additional index was introduced which changed the query tree. After removing
the statement to create unique constraint over null able field I am getting 
same query tree as expected.

3. org/apache/derbyTesting/functionTests/master/altertable.out

Original out file was expecting the creation of unique constraint to 
fail over null able fields. Updated out file to expect it to succeed.

Other failures in harness test were because of change in backing index (from 
unique to non unique) for unique constraint over not null columns. They disappeared 
after making changes related to backing index.

> provide support for unique constraint over nullable columns
> -----------------------------------------------------------
>                 Key: DERBY-3330
>                 URL: https://issues.apache.org/jira/browse/DERBY-3330
>             Project: Derby
>          Issue Type: New Feature
>          Components: Store
>    Affects Versions:
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: BTreeController.diff, derby-3330-testcase.diff, derby-3330.diff,
derby-3330v10.diff, derby-3330v11.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 nullable field. Right now derby support unique constraint
only over not null columns.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message