diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-01-11 14:00:27 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-01-19 09:55:59 -0500 |
commit | 87c9442cc30d4101693bb8ccb6fd4509aa048558 (patch) | |
tree | 99ab7b36d89776693c09f271e4de4fd4f64846e3 /jstests/core/covered_index_simple_3.js | |
parent | 71ae3ed5b7e99ddb629ec64b85f4bd75b73aff17 (diff) | |
download | mongo-87c9442cc30d4101693bb8ccb6fd4509aa048558.tar.gz |
SERVER-31785 Use 2 shards in sharded jscore passthrough.
Diffstat (limited to 'jstests/core/covered_index_simple_3.js')
-rw-r--r-- | jstests/core/covered_index_simple_3.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/core/covered_index_simple_3.js b/jstests/core/covered_index_simple_3.js index 7d021a17ca8..b53ce20d85f 100644 --- a/jstests/core/covered_index_simple_3.js +++ b/jstests/core/covered_index_simple_3.js @@ -23,7 +23,7 @@ coll.ensureIndex({foo: 1}, {sparse: true, unique: true}); // Test equality with int value var plan = coll.find({foo: 1}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.1 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -31,7 +31,7 @@ assert.eq(0, // Test equality with string value var plan = coll.find({foo: "string"}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.2 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -39,7 +39,7 @@ assert.eq(0, // Test equality with int value on a dotted field var plan = coll.find({foo: {bar: 1}}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.3 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -47,7 +47,7 @@ assert.eq(0, // Test no query var plan = coll.find({}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.4 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -56,7 +56,7 @@ assert.eq(0, // Test range query var plan = coll.find({foo: {$gt: 2, $lt: 6}}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.5 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -65,7 +65,7 @@ assert.eq(0, // Test in query var plan = coll.find({foo: {$in: [5, 8]}}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.6 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -74,7 +74,7 @@ assert.eq(0, // Test $exists true var plan = coll.find({foo: {$exists: true}}, {foo: 1, _id: 0}).hint({foo: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.7 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, @@ -85,7 +85,7 @@ coll.dropIndexes(); coll.ensureIndex({bar: 1}); var plan = coll.find({bar: {$nin: [5, 8]}}, {bar: 1, _id: 0}).hint({bar: 1}).explain("executionStats"); -assert(isIndexOnly(plan.queryPlanner.winningPlan), +assert(isIndexOnly(db, plan.queryPlanner.winningPlan), "simple.3.8 - indexOnly should be true on covered query"); assert.eq(0, plan.executionStats.totalDocsExamined, |