Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4645

The shell's db.collection.find() command asserts on regexs that the shell can't execute

    • ALL

      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.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            tad Tad Marshall
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: