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

Fix typos in update_driver.cpp error messages

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 5.2.0
    • Affects Version/s: 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.4.0, 4.4.1, 5.0.0, 4.7.0, 4.4.2, 4.2.11, 4.4.3, 4.2.12, 4.4.4, 4.2.13, 4.4.5, 4.2.14, 4.4.6, 4.2.15, 5.0.1, 4.4.7, 4.2.16, 4.4.8, 5.0.2, 5.0.3, 4.4.9, 4.2.17
    • Component/s: None
    • Fully Compatible
    • ALL
    • Hide

      Run query (e.g. in mogosh) that triggers error and shows the error message with the type, e.g. use pipeline-style update when it is not supported:

       

      db.foo.updateOne({}, [ { $set: { "foo.$[elem]": 1 } } ], { arrayFilters: [ { elem: 0 } ] })

      This triggers following error message with the described typo ("syle" instead of "style"):

      "MongoServerError: arrayFilters may not be specified for pipeline-syle updates"

       

      Show
      Run query (e.g. in mogosh) that triggers error and shows the error message with the type, e.g. use pipeline-style update when it is not supported:   db.foo.updateOne({}, [ { $set: { "foo.$[elem]": 1 } } ], { arrayFilters: [ { elem: 0 } ] }) This triggers following error message with the described typo ("syle" instead of "style"): "MongoServerError: arrayFilters may not be specified for pipeline-syle updates"  
    • QO 2021-11-15

      For some unsupported update queries with arrayFilters error messages are shown with a typo ("syle" instead of "style").

      For recent versions of MongoDB server, these are the affected error messages (taken from mongo/src/mongo/db/update/update_driver.cpp):

      • "arrayFilters may not be specified for pipeline-syle updates"
      • "arrayFilters may not be specified for delta-syle updates"
      • "arrayFilters may not be specified for transform-syle updates"

      A pull request was submitted to the GitHub repository to address this issue: https://github.com/mongodb/mongo/pull/1424

            Assignee:
            james.wahlin@mongodb.com James Wahlin
            Reporter:
            martin.mueller@cemas.io Martin Müller
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: