-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
ALL
-
Query 2019-12-02
{$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]
- related to
-
SERVER-37164 Incorrect query results on $gte null with sparse index
- Closed