> From: Tom Bradford [mailto:[EMAIL PROTECTED] > > On Friday, January 11, 2002, at 12:03 PM, Vadim Gritsenko wrote: > > Attached is the program which does (1) and (2). > > > > What could be the reason for such behavior? > > A bug :-)
Ok. I found this nasty creature. > > Where to look to find this reason? > > Probably in the Paged.java class, but it may also be in the BTreeFiler > class (though I doubt it). Actually, it's in BTree$BTreeNode class. The problem how I see it with the values which are *exactly* matching branch separators, i.e. binarySearch() > 0. In this case, instead of going to the next branch (idx++), it currently goes to the previous branch (idx), which does not have this element (see getSeparator(): parts of value2 are used as separator, and value2 is the first element of next leaf, not first one). I hope that fix I made works correctly (not sure about rightIdx though), but you as an author/one of the authors of this class should know this better (btw, where is @author? :). Regards, Vadim
BTree.diff
Description: Binary data
