summaryrefslogtreecommitdiff
path: root/jstests/distinct_index1.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2014-02-03 12:50:20 -0500
committerBenety Goh <benety@mongodb.com>2014-02-05 20:07:56 -0500
commitefeb3daac142483699f3b85809edc44e24a77ef2 (patch)
treef4b3bac546322f7893e4ac805e06bb4f42a355b7 /jstests/distinct_index1.js
parentf6e6601bcf44b9d753c71bf3fdc211ecabbe160f (diff)
downloadmongo-efeb3daac142483699f3b85809edc44e24a77ef2.tar.gz
SERVER-12525 set cursor name for OR stage
Diffstat (limited to 'jstests/distinct_index1.js')
-rw-r--r--jstests/distinct_index1.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/distinct_index1.js b/jstests/distinct_index1.js
index b82a78be96e..6de1a7927e4 100644
--- a/jstests/distinct_index1.js
+++ b/jstests/distinct_index1.js
@@ -60,3 +60,13 @@ printjson(x);
// hack. When we use the distinct hack we scan 16, currently.
assert.lte(x.stats.n, 171);
assert.eq( 0 , x.stats.nscannedObjects , "BB3" )
+
+
+
+// Cursor name should not be empty when using $or with hashed index.
+//
+t.dropIndexes();
+t.ensureIndex( { a : "hashed" } );
+x = d( "a", { $or : [ { a : 3 }, { a : 5 } ] } );
+assert.eq( 188, x.stats.n, "DA1" );
+assert.neq( "", x.stats.cursor, "DA2" );