[SERVER-41263] Disallow the empty string as an index key type Created: 21/May/19 Updated: 29/Oct/23 Resolved: 14/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1, 4.2.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Chris Harris | Assignee: | Xin Hao Zhang (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, schwerin-mms-impact | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.2
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
Outputs:
A few additional lines from 4.1.10:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2019-06-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
At present it is possible to generate an index with an empty string as the key type (eg a definition of {x:""}). The optimizer seems to be able to use this index when the key is a predicate in the query:
However it is unable to use the index to sort:
This type of index should fail validation and not be created. |
| Comments |
| Comment by Githook User [ 03/Jan/20 ] |
|
Author: {'name': 'James Wahlin', 'email': 'james.wahlin@mongodb.com', 'username': 'jameswahlin'}Message: (cherry picked from commit d5d674930f1c67f6c87d73715f82f608668d72fa)
(cherry picked from commit e09c045111610a0820cea3265d1986be5dacb541) |
| Comment by Githook User [ 10/Jun/19 ] |
|
Author: {'name': 'Xin Hao Zhang', 'email': 'xinhao.zhang@mongodb.com', 'username': 'xinhaoz'}Message: |
| Comment by Githook User [ 05/Jun/19 ] |
|
Author: {'name': 'Xin Hao Zhang', 'email': 'xinhao.zhang@mongodb.com', 'username': 'xinhaoz'}Message: |