summaryrefslogtreecommitdiff
path: root/jstests/notablescan.js
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2012-01-08 14:36:12 -0800
committerAaron <aaron@10gen.com>2012-01-18 17:31:04 -0800
commit2bd1aeb2996b7cba38218b3daddf04b12245b98d (patch)
tree1473550933ca09d2d566f5f144ac6b580036ba3f /jstests/notablescan.js
parentbaa097c07b244a69a8d409059eca4ce42810266e (diff)
downloadmongo-2bd1aeb2996b7cba38218b3daddf04b12245b98d.tar.gz
SERVER-4327 allow dummy table scans in notablescan mode
Diffstat (limited to 'jstests/notablescan.js')
-rw-r--r--jstests/notablescan.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/jstests/notablescan.js b/jstests/notablescan.js
index 2e8cb0c07be..f2ca68d2912 100644
--- a/jstests/notablescan.js
+++ b/jstests/notablescan.js
@@ -6,15 +6,24 @@ t.drop();
try {
assert.commandWorked( db._adminCommand( { setParameter:1, notablescan:true } ) );
// commented lines are SERVER-2222
-// assert.throws( function() { t.find( {a:1} ).toArray(); } );
+ if ( 0 ) { // SERVER-2222
+ assert.throws( function() { t.find( {a:1} ).toArray(); } );
+ }
t.save( {a:1} );
-// assert.throws( function() { t.count( {a:1} ); } );
-// assert.throws( function() { t.find( {} ).toArray(); } );
+ if ( 0 ) { // SERVER-2222
+ assert.throws( function() { t.count( {a:1} ); } );
+ assert.throws( function() { t.find( {} ).toArray(); } );
+ }
+ assert.eq( 1, t.find( {} ).itcount() ); // SERVER-274
assert.throws( function() { t.find( {a:1} ).toArray(); } );
assert.throws( function() { t.find( {a:1} ).hint( {$natural:1} ).toArray(); } );
t.ensureIndex( {a:1} );
assert.eq( 0, t.find( {a:1,b:1} ).itcount() );
- assert.eq( 1, t.find( {a:1,b:null} ).itcount() );
+ assert.eq( 1, t.find( {a:1,b:null} ).itcount() );
+
+ // SERVER-4327
+ assert.eq( 0, t.find( {a:{$in:[]}} ).itcount() );
+ assert.eq( 0, t.find( {a:{$in:[]},b:0} ).itcount() );
} finally {
// We assume notablescan was false before this test started and restore that
// expected value.