summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2020-05-08 14:05:12 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-19 18:57:41 +0000
commit64906095f4a590a34e1f22042aea2836721f7bbe (patch)
treebe6b8b712ad3dd33adbc95c1dcf5ffd58f33cc8e /src/mongo/db/query
parent25ee2b61ed8467f7c07b26bf52953d25caed95fd (diff)
downloadmongo-64906095f4a590a34e1f22042aea2836721f7bbe.tar.gz
SERVER-48052 Make updates create ExpressionContext with 'explain' field correctly initialized
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/get_executor.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mongo/db/query/get_executor.cpp b/src/mongo/db/query/get_executor.cpp
index b1bae642936..c27145180ac 100644
--- a/src/mongo/db/query/get_executor.cpp
+++ b/src/mongo/db/query/get_executor.cpp
@@ -915,7 +915,7 @@ StatusWith<unique_ptr<PlanExecutor, PlanExecutor::Deleter>> getExecutorUpdate(
// the collection prior to calling this method. Explain, however, will never do
// collection or database creation.
if (!collection && request->isUpsert()) {
- invariant(request->isExplain());
+ invariant(request->explain());
}
// If the parsed update does not have a user-specified collation, set it from the collection
@@ -1002,9 +1002,6 @@ StatusWith<unique_ptr<PlanExecutor, PlanExecutor::Deleter>> getExecutorUpdate(
// This is the regular path for when we have a CanonicalQuery.
unique_ptr<CanonicalQuery> cq(parsedUpdate->releaseParsedQuery());
- // Transfer the explain verbosity level into the expression context.
- cq->getExpCtx()->explain = verbosity;
-
std::unique_ptr<projection_ast::Projection> projection;
if (!request->getProj().isEmpty()) {
invariant(request->shouldReturnAnyDocs());