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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.2
    • Affects Version/s: 2.4.3
    • Component/s: None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Randolph Tan
            Reporter:
            Spencer Brody (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: