summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/cached_plan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/cached_plan.cpp')
-rw-r--r--src/mongo/db/exec/cached_plan.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/exec/cached_plan.cpp b/src/mongo/db/exec/cached_plan.cpp
index d08d0e1bfd9..a8d2d1d592b 100644
--- a/src/mongo/db/exec/cached_plan.cpp
+++ b/src/mongo/db/exec/cached_plan.cpp
@@ -66,7 +66,9 @@ namespace mongo {
_plannerParams(params),
_decisionWorks(decisionWorks),
_root(root),
- _commonStats(kStageType) {}
+ _commonStats(kStageType) {
+ invariant(_collection);
+ }
Status CachedPlanStage::pickBestPlan(PlanYieldPolicy* yieldPolicy) {
// Adds the amount of time taken by pickBestPlan() to executionTimeMillis. There's lots of