Skip to content

Commit

Permalink
SERVER-2262 add a regression test for 200 or clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
astaple committed Dec 27, 2010
1 parent 57be437 commit 18f3236
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions jstests/orf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Test a query with 200 $or clauses

t = db.jstests_orf;
t.drop();

a = [];
for( var i = 0; i < 200; ++i ) {
a.push( {_id:i} );
}
a.forEach( function( x ) { t.save( x ); } );

explain = t.find( {$or:a} ).explain();
assert.eq( 200, explain.n );
assert.eq( 200, explain.clauses.length );
assert.eq( 200, t.count( {$or:a} ) );

0 comments on commit 18f3236

Please sign in to comment.