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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.2.9, 3.6.20, 4.0.21
    • Fix Version/s: 4.2.12
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Steps To Reproduce:
      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());
    • Sprint:
      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

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

                Dates

                Created:
                Updated:
                Resolved: