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

Fix mistyped QueryPlannerAccess invariant

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 3.5.5
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • Query 2017-03-27

      There is a mistyped invariant here:

      https://github.com/mongodb/mongo/blob/r3.5.4/src/mongo/db/query/planner_access.cpp#L1218

      It currently reads

      invariant(MatchExpression::ELEM_MATCH_OBJECT);
      

      However, this will always pass, since the ELEM_MATCH_OBJECT enum value is non-zero. Instead, this check is supposed to verify that the MatchExpression node is of type ELEM_MATCH_OBJECT.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: