-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Querying
-
Minor Change
-
ALL
-
v5.0, v4.9, v4.4, v4.2
-
Query Execution 2021-06-14, Query Execution 2021-06-28
-
160
If you have a values which is undefined versus null - $in doesnt work
db.a.insert({x:1,v:null}) db.a.insert({x:2,v:""}) db.a.insert({x:3}) db.a.insert({x:4,v:undefined}) db.a.find(v:null)
Finds all except wher v is ""
but
db.a.find(v:{$in:[null,""]})
fails to find the record where x = 4
A workaround is
db.u.find({ $or : [ {v:{$type:6}},{v:{$in:[null,""]}}]})
Which is ugly
- related to
-
SERVER-58637 Temporarily disable null_query_semantics.js from multiversion passthroughs
- Closed