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.
- is depended on by
-
SERVER-9810 Assertion in mongos when running a command via a query on $cmd collection with incorrect limit when auth is enabled
-
- Closed
-