[SERVER-35454] Query system does not fail cleanly for $type:0 when an index is available Created: 06/Jun/18 Updated: 29/Oct/23 Resolved: 08/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||
| Sprint: | Query 2018-06-18 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||
| Description |
|
The $type query predicate should not support type code 0, as this is used internally for the "missing" or "EOO" BSON type. The system should reject an attempt to use $type:0 with a clear error message. Instead, when an index is available for use by the $type predicate, the server returns an internal error message such as the following:
Users who wish to check for existence of a field should instead use $exists:false. |
| Comments |
| Comment by Githook User [ 08/Jun/18 ] |
|
Author: {'username': 'dstorch', 'name': 'David Storch', 'email': 'david.storch@10gen.com'}Message: Also, improves the error message for $type:"missing". |