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:
parent
1b3225224b
commit
e4424bbe83
@ -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());
|
||||
|
||||
|
@ -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} );
|
||||
|
Loading…
Reference in New Issue
Block a user