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

An $or query with children which are all trivially false incorrectly optimizes

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.5, 4.0.0-rc0
    • Affects Version/s: 3.7.7
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • Query 2018-05-07
    • 45

      A query such as the following will never match any documents:

      // {a: {$all: []}} will never match.
      db.foo.find({$or: [{a: {$all: []}}]});
      

      The server will incorrectly optimize that query which can lead to an bug in planning.

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: