diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-12-14 21:10:37 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-12-14 21:10:37 -0500 |
commit | c6420d62e0748d5df85cc0499126c3e797c3f6cc (patch) | |
tree | b134a8938479b3a02ae2009a8739cc130e5a6439 /jstests | |
parent | 807216811773c80e47d75be43dca5da4c646e283 (diff) | |
download | mongo-c6420d62e0748d5df85cc0499126c3e797c3f6cc.tar.gz |
test for SERVER-486
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/index_check7.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jstests/index_check7.js b/jstests/index_check7.js new file mode 100644 index 00000000000..68102d61353 --- /dev/null +++ b/jstests/index_check7.js @@ -0,0 +1,15 @@ + +t = db.index_check7 +t.drop() + +for ( var i=0; i<100; i++ ) + t.save( { x : i } ) + +t.ensureIndex( { x : 1 } ) +assert.eq( 1 , t.find( { x : 27 } ).explain().nscanned , "A" ) + +t.ensureIndex( { x : -1 } ) +assert.eq( 1 , t.find( { x : 27 } ).explain().nscanned , "B" ) + +assert.eq( 41 , t.find( { x : { $gt : 59 } } ).explain().nscanned , "C" ); + |