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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.12
    • Affects Version/s: 4.2.9, 3.6.20, 4.0.21
    • Component/s: None
    • Labels:
      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

      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

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

              Created:
              Updated:
              Resolved: