/[Apache-SVN]
ViewVC logotype

Revision 1550152


Jump to revision: Previous Next
Author: dag
Date: Wed Dec 11 14:34:31 2013 UTC (10 years, 4 months ago)
Changed paths: 5
Log Message:
DERBY-532 Support deferrable constraints

Patch derby-532-nullableUniqueFix. When we changed the implementation from
special treatment of deferrable constraints in the BTree, a couple of extra
predicates needed to be added were omitted - added those here: we should not
mark the physical index with "uniqueWithDuplicateNulls" if it is deferrable.
This error was found when running the regressions with default deferrable for
all pk and unique constraints.

We also removed an unused flag "hasDeferrableChecking" in the same places (it is
not longer used by the physical index).

Added a new test case, testCompressTable, which tests the
"uniqueWithDuplicateNulls" case.

We also change the behavior in the following way for deferrable, but not
deferred constraints: if we hit a time-out or dead-lock when checking uniqueness
(in the BTree scan), we throw that time-out or dead-lock. Up till now we
converted it to a duplicate exception. We will only assume it can be a duplicate
- for later checking - iff the constraint mode is deferrable.



Changed paths

Path Details
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/BTree.java modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26