0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-109 handle no index match case in remove

This commit is contained in:
Aaron 2010-05-20 11:16:19 -07:00
parent 1b3225224b
commit e4424bbe83
2 changed files with 4 additions and 2 deletions

View File

@ -134,9 +134,8 @@ namespace mongo {
shared_ptr< DeleteOp > bestOp = s.runOpOnce( original );
shared_ptr<Cursor> creal = bestOp->newCursor();
//TODO continue
if( !creal->ok() )
return nDeleted;
continue;
CoveredIndexMatcher matcher(pattern, creal->indexKeyPattern());

View File

@ -11,7 +11,10 @@ t.save( {a:2,b:3} );
assert.eq.automsg( "3", "t.count( {$or:[{a:2},{b:3}]} )" );
assert.eq.automsg( "2", "t.count( {$or:[{a:2},{a:2}]} )" );
t.remove({ $or: [{ a: 2 }, { b: 3}] });
assert.eq.automsg( "0", "t.count()" );
t.save( {b:3} );
t.remove({ $or: [{ a: 2 }, { b: 3}] });
assert.eq.automsg( "0", "t.count()" );
t.save( {a:2} );