Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76944

Correctly return bool in the prepSubNodes function in plan_enumerator.cpp

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0, v6.0, v5.0, v4.4
    • 138

      The plan_enumerator calls prepMemo here which calls prepSubNodes here. If we have a nested AND with a child that requires an index then in prepSubNodes, the parent node calls prepSubNodes here. It correctly recognizes that the subNode is mandatory and returns false, however the call to prepSubNodes is not returned, so it's lost. This can falsely indicate that an indexed plan is possible, when it is not. We should return the value here so it is propagated to prepMemo correctly. 

            Assignee:
            adi.agrawal@mongodb.com Adi Agrawal
            Reporter:
            adi.agrawal@mongodb.com Adi Agrawal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: