[SERVER-52618] Sparse hash index should not be used for equality to null match Created: 04/Nov/20  Updated: 29/Oct/23  Resolved: 09/Dec/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.2.9, 3.6.20, 4.0.21
Fix Version/s: 4.2.12

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: James Wahlin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-51718 Disallow sparse, hashed indexes from ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Steps To Reproduce:

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
Participants:

 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



 Comments   
Comment by Githook User [ 08/Dec/20 ]

Author:

{'name': 'James Wahlin', 'email': 'james@mongodb.com', 'username': 'jameswahlin'}

Message: SERVER-52618
Branch: v4.2
https://github.com/mongodb/mongo/commit/ab521227f18b94f546fa3e23d99de4b080739a9c

Generated at Thu Feb 08 05:28:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.