summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-06-06 22:53:43 -0400
committerEliot Horowitz <eliot@10gen.com>2009-06-06 22:53:43 -0400
commitfd40d6348de2b992885440728a74e1e0e49ef9f5 (patch)
treebc9342c4b3295c377ca93cd5209c7c79e64f6fac /jstests
parent5be38d339cac4b320814e554854b81e351abf493 (diff)
downloadmongo-fd40d6348de2b992885440728a74e1e0e49ef9f5.tar.gz
broken unit test for query optimizer
Diffstat (limited to 'jstests')
-rw-r--r--jstests/index_check3.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/jstests/index_check3.js b/jstests/index_check3.js
new file mode 100644
index 00000000000..7e828bfd16e
--- /dev/null
+++ b/jstests/index_check3.js
@@ -0,0 +1,17 @@
+
+
+t = db.index_check3;
+t.drop();
+
+for ( var i=0; i<100; i++ ){
+ var o = { i : i };
+ if ( i % 2 == 0 )
+ o.foo = i;
+ t.save( o );
+}
+
+t.ensureIndex( { foo : 1 } );
+
+assert.gt( 30 , t.find( { foo : { $lt : 50 } } ).explain().nscanned , "lt" )
+//assert.gt( 30 , t.find( { foo : { $gt : 50 } } ).explain().nscanned , "gt" )
+