-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.2
-
Component/s: JavaScript, Performance, Shell, Usability
-
None
-
ALL
-
(copied to CRM)
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 SpiderMonkey V8.
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.
- duplicates
-
SERVER-27649 Don't error on serialization of $elemMatch with $regex
- Closed
- is depended on by
-
CSHARP-862 Regex Queries /s suffix
- Closed
- is duplicated by
-
SERVER-21974 mongo shell can't explain insensible case regex
- Closed
- related to
-
SERVER-16542 Shell helper for creating arbitrary BSON values
- Closed