[SERVER-32355] Use of options:x and comments with $regex search including \n can lead to incorrect documents being returned Created: 14/Dec/17 Updated: 14/Dec/17 Resolved: 14/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.4.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | William Byrne III | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | Pass the following in a file to the mongo shell:
Summary of output:
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
With a simple set of documents:
these two $regex expressions (identical except for use of quotes or slashes):
give different results, both incorrect, despite our $regex documentation suggesting that the syntaxes with the search strings wrapped in quotes or slashes are equivalent. Removing the option:x, the comment and the space leads to correct results from both forms. |
| Comments |
| Comment by Mark Agarunov [ 14/Dec/17 ] |
|
Hello william.byrne, As this appears to be the same issue detailed in Thanks, |