Fix self-swap in MultiPlanStage::removeRejectedPlans

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.0.15, 6.0.4, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • QE 2022-10-17
    • 135
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In if statement here we should check _backupPlanIdx, not _bestPlanIdx https://github.com/mongodb/mongo/blob/1d93d09948c29534f7c82950ba7771ac0f4da22c/src/mongo/db/exec/multi_plan.cpp#L367

      It is relatively harmless, but causes debug mode to show errors, because of an old C++ standard issue: https://stackoverflow.com/questions/22915325/avoiding-self-assignment-in-stdshuffle

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: