0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

shell: use -abs(limit) for explain, not -limit

This commit is contained in:
Mike Dirolf 2010-09-14 10:24:30 -04:00
parent 863ca9f697
commit 2b2e185ed3

View File

@ -238,7 +238,7 @@ DBQuery.prototype.explain = function (verbose) {
var n = this.clone();
n._ensureSpecial();
n._query.$explain = true;
n._limit = n._limit * -1;
n._limit = Math.abs(n._limit) * -1;
var e = n.next();
if (!verbose) {
delete e.allPlans;