-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.5.4
-
Component/s: Querying
-
None
-
Environment:Ubuntu Lucid
-
ALL
I'm getting an assertion failure (line db/queryutil.cpp:706) whenever "{$in: []}" appears within an $or. A nontrivial $in works fine, and "{$in: []}" works fine at the top level of the query (I've attached a transcript to illustrate this).
The application-level workaround is obvious — if you're building a query where $in appears within $or, omit the $in if the array happens to be empty — so this isn't urgent for me (not nearly as much as $or is a lifesaver ), but it's inconvenient, and moreover this could be a much subtler issue in a bigger project with complex queries, especially if some list is "usually" empty.
- duplicates
-
SERVER-1296 giving an empty array to a $in condition inside a $or causes a failed assertion
- Closed