[SERVER-4645] The shell's db.collection.find() command asserts on regexs that the shell can't execute Created: 07/Jan/12 Updated: 05/Jan/18 Resolved: 02/May/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Performance, Shell, Usability |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tad Marshall | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Duplicate | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||
| Description |
|
There is a mismatch between the capabilities of the MongoDB database and the MongoDB shell in handling regular expressions. There are regex specifications that are valid for the database that would not be valid if executed in the shell. This is due to differing abilities between PCRE and The problem comes when using profiling and trying to display the profile collection in the shell. Regular expression queries of the form /(?i)string/ perform a case-insensitive comparison when executed by the database. If these queries are captured in a profile collection, the shell is unable to display them with db.system.profile.find(). An assertion failure is displayed instead. The find() command, executed in the shell, should not try to validate data that it has been asked to display. It should display the data, and postpone validation until it has been asked to execute something. |
| Comments |
| Comment by Kelsey Schubert [ 02/May/17 ] | ||||||||||||||||||||||||||||
|
This issue has been resolved in MongoDB 3.4.2 and later as part of | ||||||||||||||||||||||||||||
| Comment by Asya Kamsky [ 20/Mar/17 ] | ||||||||||||||||||||||||||||
|
Fixed by | ||||||||||||||||||||||||||||
| Comment by Asya Kamsky [ 20/Mar/17 ] | ||||||||||||||||||||||||||||
|
3.4.1 has the same error, but 3.5.2 does not. Was this fixed as a side effect of another ticket? | ||||||||||||||||||||||||||||
| Comment by Asya Kamsky [ 19/May/16 ] | ||||||||||||||||||||||||||||
|
note that above is with 3.0.x with 3.3.6/master the error is:
| ||||||||||||||||||||||||||||
| Comment by Asya Kamsky [ 19/May/16 ] | ||||||||||||||||||||||||||||
|
This problem can be reproduced in the shell via explain - and therefore should be testable:
| ||||||||||||||||||||||||||||
| Comment by Tad Marshall [ 07/Jan/12 ] | ||||||||||||||||||||||||||||
|
Core server ticket derived from commercial support ticket. |