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

Better error for query on the $cmd namespace without a limit of 1

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.5.2
    • 2.4.3
    • None
    • ALL

    Description

      Request::isCommand() checks if a query is actually a command. It does this by checking if the namespace end in "$cmd" AND if the limit of the query is 1 or -1. If the collection is "$cmd" but the limit is not 1 or -1, it just returns false and continues. This can cause problems later as a query on the $cmd namespace starts getting treated as a normal query instead.

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: