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] Commented: (DERBY-3330) provide support for unique constraint over nullable columns
Date Thu, 14 Feb 2008 09:59:08 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568850#action_12568850

Anurag Shekhar commented on DERBY-3330:

Details about changes in java/engine/org/apache/derby/impl/store/access/btree/BTreeController.java

The new code doesn't checks for deleted records. So while looking for left and right sibling
there won't be any need to traverse multiple pages (at the most one pages to left if the new
slot is 1st slot of the page or one page of the right if the new slot is the last slot of
the page will be latched). 
Steps for duplicate detection is as follows

1. Get the previous record (may or may not be from same page)
2. if there the two record are different unlatch page and return NO_MATCH
3. if these to match obtain the lock on exiting record
4. if lock is obtained after wait (latch lost) tree might have been modified start with locating
he slot of new record
5. If the locked record is deleted return no match else return match

do the above for record at right again.

> 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-3330v2.diff, derby-3330v3.diff, derby-3330v4.diff, derby-3330v5.diff, FunctionalSpec_DERBY-3330-V2.html,
FunctionalSpec_DERBY-3330.html, UniqueConstraint_Implementation.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