[pkg-db-devel] Bug#783147: [EXTERNAL] Re: Bug#783147: db5.3-dev: The library implementation improperly contrains the BTREE comparison function.

Ward, Lee lee at sandia.gov
Wed May 6 01:12:54 UTC 2015


Agreed. It's defined over a set though. What is that set? I am thinking the set is all keys currently in the database together with the key I am attempting to insert. Are you saying, instead, that the set is all possible keys simultaneously?

Sent from my iPhone

> On May 5, 2015, at 2:52 PM, Florian Weimer <fw at deneb.enyo.de> wrote:
> 
> * Lee Ward:
> 
>> In my application, the database is keyed by interval, i.e. an <offset, extent>
>> pair. In such a database two keys will compare "equal" if two intervals
>> intersect, lesser if they do not intersect and the first interval
>> lies below the second, or greater if they do not intersect and the first lies
>> above. Thus, the constraint that the BTREE comparison function "must cause the
>> keys in the database to be well-ordered" is met.
> 
> Well-ordering requires anti-symmetry, that is compare(A, B) <= 0 and
> compare(B, A) <= 0 should imply A = B.  Your example violates that if
> A and B intersect because compare(A, B) and compare(B, A) are both
> zero, yet you want to treat A and B as distinct.



More information about the pkg-db-devel mailing list