summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Fefer <ivan.fefer@mongodb.com>2022-10-10 15:28:38 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-10 16:23:06 +0000
commitdf498b17710f364a853c4dc1731cbdc6ec91e0f5 (patch)
tree62a2dcd54017dc4d2fc803367b972df8140dcec5 /src
parent0e63fb98168e715836eac1da34695c299da11cd7 (diff)
downloadmongo-df498b17710f364a853c4dc1731cbdc6ec91e0f5.tar.gz
SERVER-70394 Fix self-swap in MultiPlanStage::removeRejectedPlans
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/exec/multi_plan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp
index cff149dd182..b95284d3b87 100644
--- a/src/mongo/db/exec/multi_plan.cpp
+++ b/src/mongo/db/exec/multi_plan.cpp
@@ -364,7 +364,7 @@ void MultiPlanStage::removeRejectedPlans() {
}
size_t startIndex = 1;
if (_backupPlanIdx != kNoSuchPlan) {
- if (_bestPlanIdx != 1) {
+ if (_backupPlanIdx != 1) {
std::swap(_children[_backupPlanIdx], _children[1]);
std::swap(_candidates[_backupPlanIdx], _candidates[1]);
_backupPlanIdx = 1;