diff options
Diffstat (limited to 'src/mongo/db/exec/skip.cpp')
-rw-r--r-- | src/mongo/db/exec/skip.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/exec/skip.cpp b/src/mongo/db/exec/skip.cpp index 0858967d168..09401905d11 100644 --- a/src/mongo/db/exec/skip.cpp +++ b/src/mongo/db/exec/skip.cpp @@ -42,7 +42,7 @@ namespace mongo { if (isEOF()) { return PlanStage::IS_EOF; } - WorkingSetID id; + WorkingSetID id = WorkingSet::INVALID_ID; StageState status = _child->work(&id); if (PlanStage::ADVANCED == status) { @@ -59,6 +59,10 @@ namespace mongo { ++_commonStats.advanced; return PlanStage::ADVANCED; } + else if (PlanStage::FAILURE == status) { + *out = id; + return status; + } else { if (PlanStage::NEED_FETCH == status) { *out = id; |