diff options
Diffstat (limited to 'src/mongo/db/query/get_executor.cpp')
-rw-r--r-- | src/mongo/db/query/get_executor.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/query/get_executor.cpp b/src/mongo/db/query/get_executor.cpp index 60d3b166d04..8cdeb17c9b0 100644 --- a/src/mongo/db/query/get_executor.cpp +++ b/src/mongo/db/query/get_executor.cpp @@ -119,6 +119,7 @@ void filterAllowedIndexEntries(const AllowedIndicesFilter& allowedIndicesFilter, namespace { // The body is below in the "count hack" section but getExecutor calls it. bool turnIxscanIntoCount(QuerySolution* soln); + } // namespace @@ -624,17 +625,17 @@ StatusWith<unique_ptr<PlanExecutor, PlanExecutor::Deleter>> getExecutorFind( Collection* collection, const NamespaceString& nss, unique_ptr<CanonicalQuery> canonicalQuery, - PlanExecutor::YieldPolicy yieldPolicy) { + PlanExecutor::YieldPolicy yieldPolicy, + size_t plannerOptions) { if (NULL != collection && canonicalQuery->getQueryRequest().isOplogReplay()) { return getOplogStartHack(opCtx, collection, std::move(canonicalQuery)); } - size_t options = QueryPlannerParams::DEFAULT; if (ShardingState::get(opCtx)->needCollectionMetadata(opCtx, nss.ns())) { - options |= QueryPlannerParams::INCLUDE_SHARD_FILTER; + plannerOptions |= QueryPlannerParams::INCLUDE_SHARD_FILTER; } return getExecutor( - opCtx, collection, std::move(canonicalQuery), PlanExecutor::YIELD_AUTO, options); + opCtx, collection, std::move(canonicalQuery), PlanExecutor::YIELD_AUTO, plannerOptions); } namespace { |