Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

correct fix for SERVER-436

  • Loading branch information...
commit e47b9a5452dfeae5d03cee09d56f9ff93edef285 1 parent 53cf01b
@erh erh authored
Showing with 6 additions and 6 deletions.
  1. +1 −5 db/btreecursor.cpp
  2. +5 −1 jstests/remove7.js
View
6 db/btreecursor.cpp
@@ -187,12 +187,8 @@ namespace mongo {
/* TODO: Switch to keep indexdetails and do idx.head! */
bucket = indexDetails.head.btree()->locate(indexDetails, indexDetails.head, keyAtKeyOfs, order, keyOfs, found, locAtKeyOfs, direction);
RARELY log() << " key seems to have moved in the index, refinding. found:" << found << endl;
- if ( found )
+ if ( ! bucket.isNull() )
skipUnusedKeys();
- else {
- RARELY log() << " can't find key, probably empty" << endl;
- bucket = DiskLoc();
- }
}
View
6 jstests/remove7.js
@@ -24,8 +24,12 @@ t.ensureIndex( { tags : 1 } );
for ( i=0; i<200; i++ ){
for ( var j=0; j<10; j++ )
t.save( { tags : getTags( 100 ) } );
- t.remove( { tags : { $in : getTags( 10 ) } } );
+ var q = { tags : { $in : getTags( 10 ) } };
+ var before = t.find( q ).count();
+ t.remove( q );
var o = db.getLastErrorObj();
+ var after = t.find( q ).count();
+ assert.eq( 0 , after , "not zero after!" );
assert.isnull( o.err , "error: " + tojson( o ) );
}
Please sign in to comment.
Something went wrong with that request. Please try again.