diff options
author | Hirday Gupta <hirday.gupta@mongodb.com> | 2020-06-24 16:49:07 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-06 23:54:22 +0000 |
commit | 2b01612eceb90dee3681e86ec2cea90229ed5fe3 (patch) | |
tree | 8e428db6ed5d64ccb4693aa7c45080ad19106837 /src | |
parent | 0b5bbf4cc0169ed2a527fe5c93d4adb09a9a5af3 (diff) | |
download | mongo-2b01612eceb90dee3681e86ec2cea90229ed5fe3.tar.gz |
SERVER-48244 remove shell-side explain string validation
(cherry picked from commit c76a5544eb4423c7dbca6862fddf9371ce999f6f)
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/shell/explainable.js | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mongo/shell/explainable.js b/src/mongo/shell/explainable.js index 795326ab9d0..da130b9b13c 100644 --- a/src/mongo/shell/explainable.js +++ b/src/mongo/shell/explainable.js @@ -4,7 +4,6 @@ // var Explainable = (function() { - var parseVerbosity = function(verbosity) { // Truthy non-strings are interpreted as "allPlansExecution" verbosity. if (verbosity && (typeof verbosity !== "string")) { @@ -16,12 +15,7 @@ var Explainable = (function() { return "queryPlanner"; } - // If we're here, then the verbosity is a string. We reject invalid strings. - if (verbosity !== "queryPlanner" && verbosity !== "executionStats" && - verbosity !== "allPlansExecution") { - throw Error("explain verbosity must be one of {" + "'queryPlanner'," + - "'executionStats'," + "'allPlansExecution'}"); - } + // All verbosity strings are passed through. Server validates if it is a known option. return verbosity; }; |