dibyendumajumdar / simpledbm

SimpleDBM is an Open Source Multi-Threaded Embeddable Transactional Database Engine in Java.
52 stars 11 forks source link

Unique index allows duplicate key insert #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Adding the same key twice to a unique index should lead to 
UniqueConstraintViolation error. However, the key is being added.

This is due to an incorrect implementation of IntexItem.compareTo() which is 
considering the location as part of the key when searching on leaf nodes.

Original issue reported on code.google.com by d.majum...@gmail.com on 6 Mar 2010 at 7:11

GoogleCodeExporter commented 9 years ago
The existing test case was checking unique constraint violation on non-unique 
indexes, 
which is why this bug was never detected. 

Original comment by d.majum...@gmail.com on 6 Mar 2010 at 9:45

GoogleCodeExporter commented 9 years ago
Fixed and released in 1.0.17

Original comment by d.majum...@gmail.com on 7 Mar 2010 at 2:58

GoogleCodeExporter commented 9 years ago

Original comment by d.majum...@gmail.com on 7 Mar 2010 at 3:00