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

Sparse hash index should not be used for equality to null match

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.2.9, 3.6.20, 4.0.21
    • 4.2.12
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.0
    • Hide

      db.test.createIndex({a: 'hashed'}, {sparse: true});
      db.test.insert({});
      assert.eq(1, db.test.find({a: null}).count());
      

      Show
      db.test.createIndex({a: 'hashed'}, {sparse: true}); db.test.insert({}); assert.eq(1, db.test.find({a: null}).count());
    • Query 2020-11-30, Query 2020-12-14

    Description

      Note: This ticket tracks this issue for only the 3.6, 4.0 and 4.2 branches. For 4.4 and master this will be fixed as part of SERVER-51718

      Attachments

        Issue Links

          Activity

            People

              james.wahlin@mongodb.com James Wahlin
              james.wahlin@mongodb.com James Wahlin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: