dynamobi/dynamobi — Issue #173: [LDB-149] splicing together two singleton entries causes an assertion error
Author: dynamobi-build
Created: 2011-12-30 02:18:36+00:00
State: open
Labels: LDB

[reporter="jpham", created="Tue, 12 Dec 2006 04:13:00 -0500 (GMT-05:00)"]
Not sure whether this is a problem with the splicer or with LbmEntry.

To reproduce:

Uncomment LbmSplicerExecStream.cpp Line 84 "uniqueKey = true"

Run mergUniqIndex.sql

The first merge statement fails due to:

java: LbmEntry.cpp:750: bool fennel::LbmEntry::adjustEntry(fennel::TupleData&): Assertion `!(isSingleton() && isSingleton(inputTuple))' failed.

Notes:

* This problem is exposed by another issue: non-unique indexes are passed to the splicer stream seem to be unique indexes even though they are not (due to 2nd btree passed into splicer stream def).

* There is a table EMP with constraints/indexes on EMPID, DEPTNO, CITY. The first insertion statement causes Wilma (RID=2) to be deleted due to duplicate DEPTNO. The subsequent merge statement deletes RID=0. The splicer for the deletion index attempts to merge RID=0 singleton onto the existing RID=2 singleton, causing the assertion error.

* There may be other problems with the splicer code for unique constraints, but this was as far as I got.