[SERVER-21065] Optimizer should consider predicate with "$in" operator having a single argument to be equivalent to the equality operator Created: 22/Oct/15 Updated: 17/Jan/17 Resolved: 11/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dmitry Ryabtsev | Assignee: | Benjamin Murphy |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Sprint: | Query 12 (04/04/16), Query 13 (04/22/16) | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||
| Description |
|
Query shapes like {a: { "$in": [1]}, b:1, c: { "$in": [1,2,3]}} and {a: 1, b:1, c: { "$in": [1,2,3]}} are cached separately while they are equivalent. It may not be a big problem, but mongod could be smart enough to recognize this. |
| Comments |
| Comment by Githook User [ 11/Apr/16 ] |
|
Author: {u'username': u'benjaminmurphy', u'name': u'Benjamin Murphy', u'email': u'benjamin_murphy@me.com'}Message: |
| Comment by Max Hirschhorn [ 09/Apr/16 ] |
|
Re-opening this ticket so that the heap-use-after-free in canonical_query_test can be addressed. |
| Comment by Githook User [ 07/Apr/16 ] |
|
Author: {u'username': u'benjaminmurphy', u'name': u'Benjamin Murphy', u'email': u'benjamin_murphy@me.com'}Message: |
| Comment by David Storch [ 23/Oct/15 ] |
|
SERVER-12024 could be one good way to solve this. |