summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2014-01-13 18:39:12 -0500
committerJason Rassi <rassi@10gen.com>2014-01-13 18:45:55 -0500
commit4f9c0008b9c046690d9d84579ccd98b8553412ab (patch)
tree404a442420120ba783e1ba55a71436b7d89c5cb2 /src/mongo/db
parentfb2c23ae94e9acf8549d8cc95e584c7e7836a952 (diff)
downloadmongo-4f9c0008b9c046690d9d84579ccd98b8553412ab.tar.gz
SERVER-12038 SERVER-12193 PlanCacheTest should use $meta properly
It is no longer valid to use a $meta sort without a $meta projection. Update PlanCacheTest suite accordingly.
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/query/plan_cache_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/query/plan_cache_test.cpp b/src/mongo/db/query/plan_cache_test.cpp
index 492de787fda..b127fec8b64 100644
--- a/src/mongo/db/query/plan_cache_test.cpp
+++ b/src/mongo/db/query/plan_cache_test.cpp
@@ -430,7 +430,8 @@ namespace {
// With sort
testGetPlanCacheKey("{}", "{a: 1}", "{}", "anaa");
testGetPlanCacheKey("{}", "{a: -1}", "{}", "anda");
- testGetPlanCacheKey("{}", "{a: {$meta: 'textScore'}}", "{}", "anta");
+ testGetPlanCacheKey("{}", "{a: {$meta: 'textScore'}}", "{a: {$meta: 'textScore'}}",
+ "antap{ $meta: \"textScore\" }a");
// With projection
testGetPlanCacheKey("{}", "{}", "{a: 1}", "anp1a");
testGetPlanCacheKey("{}", "{}", "{a: 0}", "anp0a");