diff options
author | Ivan Fefer <ivan.fefer@mongodb.com> | 2022-10-10 15:28:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-02 11:33:16 +0000 |
commit | d3e569ea57fab877c9e2b9036c13100828c1e4b3 (patch) | |
tree | d509218f51e292311c2d04c465ee319ab8b04be4 | |
parent | 184d528d491daa53a06230e316f097b625d6e9dd (diff) | |
download | mongo-d3e569ea57fab877c9e2b9036c13100828c1e4b3.tar.gz |
SERVER-70394 Fix self-swap in MultiPlanStage::removeRejectedPlans
(cherry picked from commit df498b17710f364a853c4dc1731cbdc6ec91e0f5)
-rw-r--r-- | src/mongo/db/exec/multi_plan.cpp | 2 |
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 8c816ebdcbd..00254cef133 100644 --- a/src/mongo/db/exec/multi_plan.cpp +++ b/src/mongo/db/exec/multi_plan.cpp @@ -376,7 +376,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; |