the fetchjoin code with a sorted left oid sequence (joining into a void sequence) makes sure that the left sequence is first reduced to only the matching subset (using a view-select) . Later on, it blindly assumes that all tuples match once.
the fetchjoin code with a sorted left oid sequence (joining into a void sequence)
makes sure that the left sequence is first reduced to only the matching
subset (using a view-select) . Later on, it blindly assumes that all tuples match once.

however, this select is not executed on sorted left sequences that start with nil
values. this produces incorrect matches of nils in the join.

the reason is that oid_nil is *not* considered smaller than the other oid values.
normally, oid-code falls under the int or lng implementations, which are signed ints.

however, oid's are defined now as size_t (unsigned natural int), with the highest
bit ignored.The only legal value withthis bit set is oid_nil. However, this value
should be treated as smaller than all other values.

in my view, the real solution to the problem is to redefine oid as ssize_t.
this has been applied locally now.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb