summaryrefslogtreecommitdiff
path: root/jstests/libs/analyze_plan.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/libs/analyze_plan.js')
-rw-r--r--jstests/libs/analyze_plan.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/jstests/libs/analyze_plan.js b/jstests/libs/analyze_plan.js
index dcfb3f11221..9ae5e62ba65 100644
--- a/jstests/libs/analyze_plan.js
+++ b/jstests/libs/analyze_plan.js
@@ -526,9 +526,18 @@ function getPlanCacheKeyFromExplain(explainRes, db) {
* Helper to run a explain on the given query shape and get the "planCacheKey" from the explain
* result.
*/
-function getPlanCacheKeyFromShape({query = {}, projection = {}, sort = {}, collection, db}) {
- const explainRes =
- assert.commandWorked(collection.explain().find(query, projection).sort(sort).finish());
+function getPlanCacheKeyFromShape({
+ query = {},
+ projection = {},
+ sort = {},
+ collation = {
+ locale: "simple"
+ },
+ collection,
+ db
+}) {
+ const explainRes = assert.commandWorked(
+ collection.explain().find(query, projection).collation(collation).sort(sort).finish());
return getPlanCacheKeyFromExplain(explainRes, db);
}