diff options
Diffstat (limited to 'src/mongo/db/query/get_executor.cpp')
-rw-r--r-- | src/mongo/db/query/get_executor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/query/get_executor.cpp b/src/mongo/db/query/get_executor.cpp index fcb7c87a427..7f148d2b961 100644 --- a/src/mongo/db/query/get_executor.cpp +++ b/src/mongo/db/query/get_executor.cpp @@ -61,6 +61,7 @@ #include "mongo/db/index_names.h" #include "mongo/db/matcher/extensions_callback_noop.h" #include "mongo/db/matcher/extensions_callback_real.h" +#include "mongo/db/query/bind_input_params.h" #include "mongo/db/query/canonical_query.h" #include "mongo/db/query/canonical_query_encoder.h" #include "mongo/db/query/classic_plan_cache.h" @@ -1070,6 +1071,10 @@ protected: invariant(sbeYieldPolicy); sbeYieldPolicy->registerPlan(root.get()); + // If the cached plan is parameterized, bind new values for the parameters into the runtime + // environment. + input_params::bind(*_cq, stageData.inputParamToSlotMap, stageData.env); + auto result = makeResult(); result->setDecisionWorks(cacheEntry->decisionWorks); result->emplace(std::move(cacheEntry->debugInfo), |