diff options
author | Benety Goh <benety@mongodb.com> | 2014-02-06 17:08:39 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-02-10 12:23:27 -0500 |
commit | 91204d077bb34b40d1cffa2bbe40c92a08c64d66 (patch) | |
tree | 9d34b63a984ab4fb04f61fc4070454273b59adee /src/mongo/db/exec/limit.cpp | |
parent | 5d94703d7dbbf99de25152e69aacf47b4d09c2d4 (diff) | |
download | mongo-91204d077bb34b40d1cffa2bbe40c92a08c64d66.tar.gz |
SERVER-12398 bubble error from plan stages to runner
Diffstat (limited to 'src/mongo/db/exec/limit.cpp')
-rw-r--r-- | src/mongo/db/exec/limit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/exec/limit.cpp b/src/mongo/db/exec/limit.cpp index cd85d4e2c66..879f0b86e37 100644 --- a/src/mongo/db/exec/limit.cpp +++ b/src/mongo/db/exec/limit.cpp @@ -43,7 +43,7 @@ namespace mongo { // If we've returned as many results as we're limited to, isEOF will be true. if (isEOF()) { return PlanStage::IS_EOF; } - WorkingSetID id; + WorkingSetID id = WorkingSet::INVALID_ID; StageState status = _child->work(&id); if (PlanStage::ADVANCED == status) { @@ -52,6 +52,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; |