diff options
author | Ian Boros <ian.boros@mongodb.com> | 2020-01-30 13:10:55 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-28 22:16:41 +0000 |
commit | cfa5c05fa1855fb1a04cb3a6e2eb10a7e82bf726 (patch) | |
tree | 7ab1e1ce8e2edd6837952c131fe14d43a0633235 /src/mongo/db/ops/update.cpp | |
parent | 793ae32c597f197b6445750aa9bfdaabc206132d (diff) | |
download | mongo-cfa5c05fa1855fb1a04cb3a6e2eb10a7e82bf726.tar.gz |
SERVER-45406 Plumb ExpressionContext through PlanStage
This patch includes also moves ownership of the collator to the ExpressionContext.
Diffstat (limited to 'src/mongo/db/ops/update.cpp')
-rw-r--r-- | src/mongo/db/ops/update.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp index 00b57ba533c..81683541275 100644 --- a/src/mongo/db/ops/update.cpp +++ b/src/mongo/db/ops/update.cpp @@ -97,8 +97,8 @@ UpdateResult update(OperationContext* opCtx, Database* db, const UpdateRequest& uassertStatusOK(parsedUpdate.parseRequest()); OpDebug* const nullOpDebug = nullptr; - auto exec = uassertStatusOK(getExecutorUpdate( - opCtx, nullOpDebug, collection, &parsedUpdate, boost::none /* verbosity */)); + auto exec = uassertStatusOK( + getExecutorUpdate(nullOpDebug, collection, &parsedUpdate, boost::none /* verbosity */)); uassertStatusOK(exec->executePlan()); @@ -111,8 +111,8 @@ BSONObj applyUpdateOperators(OperationContext* opCtx, const NamespaceString& nss, const BSONObj& from, const BSONObj& operators) { - const CollatorInterface* collator = nullptr; - boost::intrusive_ptr<ExpressionContext> expCtx(new ExpressionContext(opCtx, collator, nss)); + auto expCtx = + make_intrusive<ExpressionContext>(opCtx, std::unique_ptr<CollatorInterface>(nullptr), nss); UpdateDriver driver(std::move(expCtx)); std::map<StringData, std::unique_ptr<ExpressionWithPlaceholder>> arrayFilters; driver.parse(operators, arrayFilters); |