summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/plan_cache_test.cpp
diff options
context:
space:
mode:
authorIan Boros <puppyofkosh@gmail.com>2019-04-04 19:20:35 -0400
committerIan Boros <puppyofkosh@gmail.com>2019-04-11 18:34:10 -0400
commit502df279c7476c01758ab210728f4acc4a27a218 (patch)
treef350da86174a673c792ca99e16ae43a0319e71c8 /src/mongo/db/query/plan_cache_test.cpp
parentd131d7861c73efe052c5909ae8f1452c100a461d (diff)
downloadmongo-502df279c7476c01758ab210728f4acc4a27a218.tar.gz
SERVER-39567 Change find min/max options to require hint
Diffstat (limited to 'src/mongo/db/query/plan_cache_test.cpp')
-rw-r--r--src/mongo/db/query/plan_cache_test.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/query/plan_cache_test.cpp b/src/mongo/db/query/plan_cache_test.cpp
index 6cf50b688a1..5614137b90a 100644
--- a/src/mongo/db/query/plan_cache_test.cpp
+++ b/src/mongo/db/query/plan_cache_test.cpp
@@ -394,7 +394,8 @@ TEST(PlanCacheTest, ShouldNotCacheQueryWithHint) {
* Min queries are a specialized case of hinted queries
*/
TEST(PlanCacheTest, ShouldNotCacheQueryWithMin) {
- unique_ptr<CanonicalQuery> cq(canonicalize("{a: 1}", "{}", "{}", 0, 0, "{}", "{a: 100}", "{}"));
+ unique_ptr<CanonicalQuery> cq(
+ canonicalize("{a: 1}", "{}", "{}", 0, 0, "{a: 1}", "{a: 100}", "{}"));
assertShouldNotCacheQuery(*cq);
}
@@ -402,7 +403,8 @@ TEST(PlanCacheTest, ShouldNotCacheQueryWithMin) {
* Max queries are non-cacheable for the same reasons as min queries.
*/
TEST(PlanCacheTest, ShouldNotCacheQueryWithMax) {
- unique_ptr<CanonicalQuery> cq(canonicalize("{a: 1}", "{}", "{}", 0, 0, "{}", "{}", "{a: 100}"));
+ unique_ptr<CanonicalQuery> cq(
+ canonicalize("{a: 1}", "{}", "{}", 0, 0, "{a: 1}", "{}", "{a: 100}"));
assertShouldNotCacheQuery(*cq);
}
@@ -1659,7 +1661,7 @@ TEST_F(CachePlanSelectionTest, GeoNear2DNotCached) {
TEST_F(CachePlanSelectionTest, MinNotCached) {
addIndex(BSON("a" << 1), "a_1");
- runQueryHintMinMax(BSONObj(), BSONObj(), fromjson("{a: 1}"), BSONObj());
+ runQueryHintMinMax(BSONObj(), fromjson("{a: 1}"), fromjson("{a: 1}"), BSONObj());
assertNotCached(
"{fetch: {filter: null, "
"node: {ixscan: {filter: null, pattern: {a: 1}}}}}");
@@ -1667,7 +1669,7 @@ TEST_F(CachePlanSelectionTest, MinNotCached) {
TEST_F(CachePlanSelectionTest, MaxNotCached) {
addIndex(BSON("a" << 1), "a_1");
- runQueryHintMinMax(BSONObj(), BSONObj(), BSONObj(), fromjson("{a: 1}"));
+ runQueryHintMinMax(BSONObj(), fromjson("{a: 1}"), BSONObj(), fromjson("{a: 1}"));
assertNotCached(
"{fetch: {filter: null, "
"node: {ixscan: {filter: null, pattern: {a: 1}}}}}");