Details
-
Bug
-
Resolution: Gone away
-
Major - P3
-
None
-
None
-
None
-
ALL
-
Query 2019-12-02
Description
{$eq: null} returns true for missing, null and undefined values. Our index bounds generation does not include 'undefined' for predicates like {$gte: null} (or $lte).
db.c.insert({a: null})
|
db.c.insert({a: undefined})
|
db.c.find({a: {$gte: null}})
|
// Returns both documents inserted
|
db.c.createIndex({a: 1})
|
db.c.find({a: {$gte: null}})
|
// Only returns the document containing 'null' because bounds generated are only for [null, null]
|
Attachments
Issue Links
- related to
-
SERVER-37164 Incorrect query results on $gte null with sparse index
-
- Backlog
-