diff options
author | Aaron <aaron@10gen.com> | 2011-04-25 13:29:38 -0700 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2011-04-25 13:29:51 -0700 |
commit | 3af50f5b941a07b0f290c7f8ee2726c85e2d0699 (patch) | |
tree | 0579717f4bd14f63bcead3b95cec70bc7743a1bb /dbtests | |
parent | 06b905b0fd11021444ba964d70ee012b81684bd2 (diff) | |
download | mongo-3af50f5b941a07b0f290c7f8ee2726c85e2d0699.tar.gz |
SERVER-958 merge and address mongos dependency differences
Diffstat (limited to 'dbtests')
-rw-r--r-- | dbtests/queryoptimizertests.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dbtests/queryoptimizertests.cpp b/dbtests/queryoptimizertests.cpp index b58d9296905..b5cf2acb982 100644 --- a/dbtests/queryoptimizertests.cpp +++ b/dbtests/queryoptimizertests.cpp @@ -879,12 +879,12 @@ namespace QueryOptimizerTests { IndexBase::client_.insert( ns(), BSON( "a" << BSON_ARRAY( 1 << 2 ) << "b" << 1 ) ); // Valid ranges match possible for both indexes. FieldRangeSetPair frsp1( ns(), BSON( "a" << GT << 1 << LT << 4 << "b" << GT << 1 << LT << 4 ) ); - ASSERT( frsp1.matchPossibleForIndex( nsd(), a ) ); - ASSERT( frsp1.matchPossibleForIndex( nsd(), b ) ); + ASSERT( frsp1.matchPossibleForIndex( nsd(), a, BSON( "a" << 1 ) ) ); + ASSERT( frsp1.matchPossibleForIndex( nsd(), b, BSON( "b" << 1 ) ) ); // Single key invalid range means match impossible for single key index. FieldRangeSetPair frsp2( ns(), BSON( "a" << GT << 4 << LT << 1 << "b" << GT << 4 << LT << 1 ) ); - ASSERT( frsp2.matchPossibleForIndex( nsd(), a ) ); - ASSERT( !frsp2.matchPossibleForIndex( nsd(), b ) ); + ASSERT( frsp2.matchPossibleForIndex( nsd(), a, BSON( "a" << 1 ) ) ); + ASSERT( !frsp2.matchPossibleForIndex( nsd(), b, BSON( "b" << 1 ) ) ); } }; @@ -1538,7 +1538,7 @@ namespace QueryOptimizerTests { QueryPlanSet s( ns(), frsp, frspOrig, BSON( "a" << 4 ), BSON( "b" << 1 ) ); ScanOnlyTestOp op; s.runOp( op ); - pair< BSONObj, long long > best = s.frsp().bestIndexForPatterns( BSON( "b" << 1 ) ); + pair< BSONObj, long long > best = QueryUtilIndexed::bestIndexForPatterns( s.frsp(), BSON( "b" << 1 ) ); ASSERT( fromjson( "{$natural:1}" ).woCompare( best.first ) == 0 ); ASSERT_EQUALS( 1, best.second ); |