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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.7.7
    • 3.6.5, 4.0.0-rc0
    • Querying
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • Query 2018-05-07
    • 45

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: