$elemMatch should check for strict object type when matching sub-object

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The code in ElemMatchObjectMatchExpression::matchesArray() is not checking for strict object type for sub-objects. This means the _sub match expression could incorrectly be applied on a sub-array and match wrong documents in some cases. We should change the above condition to inner.type() == Object instead.

            Assignee:
            [DO NOT USE] Backlog - Query Execution
            Reporter:
            Arun Banala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: