mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
$explain should honor limit()
This commit is contained in:
parent
261d46c2f2
commit
805b9b23ad
@ -690,6 +690,8 @@ QueryResult* runQuery(Message& message, const char *ns, int ntoskip, int _ntoret
|
||||
} else {
|
||||
if( explain ) {
|
||||
n++;
|
||||
if( n >= ntoreturn && !wantMore )
|
||||
break; // .limit() was used, show just that much.
|
||||
}
|
||||
else {
|
||||
bool ok = fillQueryResultFromObj(b, filter.get(), js);
|
||||
|
Loading…
Reference in New Issue
Block a user