diff options
author | Benety Goh <benety@mongodb.com> | 2014-02-03 12:50:20 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-02-05 20:07:56 -0500 |
commit | efeb3daac142483699f3b85809edc44e24a77ef2 (patch) | |
tree | f4b3bac546322f7893e4ac805e06bb4f42a355b7 /jstests/distinct_index1.js | |
parent | f6e6601bcf44b9d753c71bf3fdc211ecabbe160f (diff) | |
download | mongo-efeb3daac142483699f3b85809edc44e24a77ef2.tar.gz |
SERVER-12525 set cursor name for OR stage
Diffstat (limited to 'jstests/distinct_index1.js')
-rw-r--r-- | jstests/distinct_index1.js | 10 |
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" ); |