diff options
Diffstat (limited to 'src/mongo/db/commands/mr.cpp')
-rw-r--r-- | src/mongo/db/commands/mr.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 580918250a0..3cfbad4b4c7 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -53,7 +53,6 @@ #include "mongo/db/exec/working_set_common.h" #include "mongo/db/index/index_descriptor.h" #include "mongo/db/matcher/extensions_callback_real.h" -#include "mongo/db/matcher/matcher.h" #include "mongo/db/op_observer.h" #include "mongo/db/ops/insert.h" #include "mongo/db/query/find_common.h" @@ -1096,7 +1095,14 @@ void State::finalReduce(OperationContext* opCtx, CurOp* curOp, ProgressMeterHold auto qr = stdx::make_unique<QueryRequest>(_config.incLong); qr->setSort(sortKey); - auto statusWithCQ = CanonicalQuery::canonicalize(opCtx, std::move(qr), extensionsCallback); + const boost::intrusive_ptr<ExpressionContext> expCtx; + auto statusWithCQ = + CanonicalQuery::canonicalize(opCtx, + std::move(qr), + expCtx, + extensionsCallback, + MatchExpressionParser::kAllowAllSpecialFeatures & + ~MatchExpressionParser::AllowedFeatures::kExpr); verify(statusWithCQ.isOK()); std::unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue()); @@ -1464,8 +1470,14 @@ public: const ExtensionsCallbackReal extensionsCallback(opCtx, &config.nss); - auto statusWithCQ = - CanonicalQuery::canonicalize(opCtx, std::move(qr), extensionsCallback); + const boost::intrusive_ptr<ExpressionContext> expCtx; + auto statusWithCQ = CanonicalQuery::canonicalize( + opCtx, + std::move(qr), + expCtx, + extensionsCallback, + MatchExpressionParser::kAllowAllSpecialFeatures & + ~MatchExpressionParser::AllowedFeatures::kExpr); if (!statusWithCQ.isOK()) { uasserted(17238, "Can't canonicalize query " + config.filter.toString()); return 0; |