-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
Dwight noticed this yesterday. We probably want to do woCompare to handle cases like int/double comparison.
bool BtreeBucket::exists(const IndexDetails& idx, const DiskLoc &thisLoc, const BSONObj& key, const Ordering& order) const {
int pos;
bool found;
DiskLoc b = locate(idx, thisLoc, key, order, pos, found, minDiskLoc);
// skip unused keys
while ( 1 )
return false;
}
bool BtreeBucket::wouldCreateDup(
const IndexDetails& idx, const DiskLoc &thisLoc,
const BSONObj& key, const Ordering& order,
const DiskLoc &self) const {
int pos;
bool found;
DiskLoc b = locate(idx, thisLoc, key, order, pos, found, minDiskLoc);
while ( !b.isNull() ) {
// we skip unused keys
const BtreeBucket *bucket = b.btree();
const _KeyNode& kn = bucket->k(pos);
if ( kn.isUsed() )
b = bucket->advance(b, pos, 1, "BtreeBucket::dupCheck");
}
return false;
}