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

Switch order of checkFieldType calls for find command collection identifier arguments

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 3.6.0-rc1
    • None
    • Storage
    • None
    • Fully Compatible
    • Storage 2017-10-23

    Description

      As part of the commit for SERVER-27991, which allows specifying a UUID instead of a collection name as the collection identifier for a find command, we check for both types when examining the collection identifier argument. Presently, if one fails to provide a find command with either a string or a BinData UUID, this results in the following error:

      Failed to parse: find: 1.0. 'find' field must be of BSON type binData.

      The order of the checkFieldType calls should be switched so the error that gets output when neither a UUID nor a collection name is specified says that BSON type "String" was expected.

      Attachments

        Activity

          People

            maria.vankeulen@mongodb.com Maria van Keulen
            maria.vankeulen@mongodb.com Maria van Keulen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: