summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/merge_sort.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2014-02-06 17:08:39 -0500
committerBenety Goh <benety@mongodb.com>2014-02-10 12:23:27 -0500
commit91204d077bb34b40d1cffa2bbe40c92a08c64d66 (patch)
tree9d34b63a984ab4fb04f61fc4070454273b59adee /src/mongo/db/exec/merge_sort.cpp
parent5d94703d7dbbf99de25152e69aacf47b4d09c2d4 (diff)
downloadmongo-91204d077bb34b40d1cffa2bbe40c92a08c64d66.tar.gz
SERVER-12398 bubble error from plan stages to runner
Diffstat (limited to 'src/mongo/db/exec/merge_sort.cpp')
-rw-r--r--src/mongo/db/exec/merge_sort.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/exec/merge_sort.cpp b/src/mongo/db/exec/merge_sort.cpp
index 8e17a1e3e2e..52d1c00bd67 100644
--- a/src/mongo/db/exec/merge_sort.cpp
+++ b/src/mongo/db/exec/merge_sort.cpp
@@ -63,7 +63,7 @@ namespace mongo {
// We have some child that we don't have a result from. Each child must have a result
// in order to pick the minimum result among all our children. Work a child.
PlanStage* child = _noResultToMerge.front();
- WorkingSetID id;
+ WorkingSetID id = WorkingSet::INVALID_ID;
StageState code = child->work(&id);
if (PlanStage::ADVANCED == code) {
@@ -120,6 +120,10 @@ namespace mongo {
++_commonStats.needTime;
return PlanStage::NEED_TIME;
}
+ else if (PlanStage::FAILURE == code) {
+ *out = id;
+ return code;
+ }
else {
if (PlanStage::NEED_FETCH == code) {
*out = id;