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

Check unsupported regular expression options in BSON documents in the validate command

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-08-08, Execution Team 2022-08-22

      We would want to validate the regular expression options according to the BSON spec:

      Options are identified by characters, which must be stored in alphabetical order. Valid options are 'i' for case insensitive matching, 'm' for multiline matching, 'x' for verbose mode, 'l' to make \w, \W, etc. locale dependent, 's' for dotall mode ('.' matches everything), and 'u' to make \w, \W, etc. match unicode.????

      We would want return warnings when running the validate command with/without the checkBSONConsistency: true option.

      There might not be an existing interface in our jstest to insert non-conformant regex documents, so we would want to use wt tool to manually inject them. See example.

            Assignee:
            richard.hausman@mongodb.com Richard Hausman (Inactive)
            Reporter:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: