A query such as the following will never match any documents:
// {a: {$all: []}} will never match.
db.foo.find({$or: [{a: {$all: []}}]});
The server will incorrectly optimize that query which can lead to an bug in planning.
- related to
-
SERVER-34759 Improve the planner to detect {$alwaysTrue: 1} to mean the same thing as {$and: []} and {}.
- Closed