add index id in userCreateNS, unless this is not requested in create spec
This commit is contained in:
@@ -425,14 +425,14 @@ namespace QueryOptimizerTests {
|
||||
ASSERT( p8.optimal() );
|
||||
QueryPlan p9( FBS( BSON( "a" << 1 << "b" << LT << 1 ) ), BSON( "a" << 1 ), INDEX( "a" << 1 << "b" << 1 << "c" << 1 ) );
|
||||
ASSERT( p9.optimal() );
|
||||
QueryPlan p10( FBS( BSON( "a" << 1 ) ), BSONObj(), INDEX( "a" << 1 << "b" << 1 << "c" << 1 ) );
|
||||
ASSERT( p10.optimal() );
|
||||
}
|
||||
};
|
||||
|
||||
class MoreOptimal : public Base {
|
||||
public:
|
||||
void run() {
|
||||
QueryPlan p10( FBS( BSON( "a" << 1 ) ), BSONObj(), INDEX( "a" << 1 << "b" << 1 << "c" << 1 ) );
|
||||
ASSERT( p10.optimal() );
|
||||
QueryPlan p11( FBS( BSON( "a" << 1 << "b" << LT << 1 ) ), BSONObj(), INDEX( "a" << 1 << "b" << 1 << "c" << 1 ) );
|
||||
ASSERT( p11.optimal() );
|
||||
QueryPlan p12( FBS( BSON( "a" << LT << 1 ) ), BSONObj(), INDEX( "a" << 1 << "b" << 1 << "c" << 1 ) );
|
||||
@@ -655,12 +655,13 @@ namespace QueryOptimizerTests {
|
||||
string err;
|
||||
ASSERT_EQUALS( 0, runCount( ns(), BSON( "query" << BSON( "a" << 4 ) ), err ) );
|
||||
BSONObj one = BSON( "a" << 1 );
|
||||
BSONObj four = BSON( "a" << 4 );
|
||||
BSONObj fourA = BSON( "a" << 4 );
|
||||
BSONObj fourB = BSON( "a" << 4 );
|
||||
theDataFileMgr.insert( ns(), one );
|
||||
ASSERT_EQUALS( 0, runCount( ns(), BSON( "query" << BSON( "a" << 4 ) ), err ) );
|
||||
theDataFileMgr.insert( ns(), four );
|
||||
theDataFileMgr.insert( ns(), fourA );
|
||||
ASSERT_EQUALS( 1, runCount( ns(), BSON( "query" << BSON( "a" << 4 ) ), err ) );
|
||||
theDataFileMgr.insert( ns(), four );
|
||||
theDataFileMgr.insert( ns(), fourB );
|
||||
ASSERT_EQUALS( 2, runCount( ns(), BSON( "query" << BSON( "a" << 4 ) ), err ) );
|
||||
ASSERT_EQUALS( 3, runCount( ns(), BSON( "query" << BSONObj() ), err ) );
|
||||
ASSERT_EQUALS( 3, runCount( ns(), BSON( "query" << BSON( "a" << GT << 0 ) ), err ) );
|
||||
@@ -963,58 +964,58 @@ namespace QueryOptimizerTests {
|
||||
class All : public UnitTest::Suite {
|
||||
public:
|
||||
All() {
|
||||
add< FieldBoundTests::Empty >();
|
||||
add< FieldBoundTests::Eq >();
|
||||
add< FieldBoundTests::DupEq >();
|
||||
add< FieldBoundTests::Lt >();
|
||||
add< FieldBoundTests::Lte >();
|
||||
add< FieldBoundTests::Gt >();
|
||||
add< FieldBoundTests::Gte >();
|
||||
add< FieldBoundTests::TwoLt >();
|
||||
add< FieldBoundTests::TwoGt >();
|
||||
add< FieldBoundTests::EqGte >();
|
||||
add< FieldBoundTests::EqGteInvalid >();
|
||||
add< FieldBoundTests::Regex >();
|
||||
add< FieldBoundTests::UnhelpfulRegex >();
|
||||
add< FieldBoundTests::In >();
|
||||
add< FieldBoundTests::Equality >();
|
||||
add< FieldBoundTests::SimplifiedQuery >();
|
||||
add< FieldBoundTests::QueryPatternTest >();
|
||||
add< FieldBoundTests::NoWhere >();
|
||||
add< FieldBoundTests::Numeric >();
|
||||
add< QueryPlanTests::NoIndex >();
|
||||
add< QueryPlanTests::SimpleOrder >();
|
||||
add< QueryPlanTests::MoreIndexThanNeeded >();
|
||||
add< QueryPlanTests::IndexSigns >();
|
||||
add< QueryPlanTests::IndexReverse >();
|
||||
add< QueryPlanTests::NoOrder >();
|
||||
add< QueryPlanTests::EqualWithOrder >();
|
||||
add< QueryPlanTests::Optimal >();
|
||||
add< QueryPlanTests::MoreOptimal >();
|
||||
add< QueryPlanTests::KeyMatch >();
|
||||
add< QueryPlanTests::ExactKeyQueryTypes >();
|
||||
add< QueryPlanTests::Unhelpful >();
|
||||
add< QueryPlanSetTests::NoIndexes >();
|
||||
add< QueryPlanSetTests::Optimal >();
|
||||
add< QueryPlanSetTests::NoOptimal >();
|
||||
add< QueryPlanSetTests::NoSpec >();
|
||||
add< QueryPlanSetTests::HintSpec >();
|
||||
add< QueryPlanSetTests::HintName >();
|
||||
add< QueryPlanSetTests::NaturalHint >();
|
||||
add< QueryPlanSetTests::NaturalSort >();
|
||||
add< QueryPlanSetTests::BadHint >();
|
||||
add< QueryPlanSetTests::Count >();
|
||||
add< QueryPlanSetTests::QueryMissingNs >();
|
||||
add< QueryPlanSetTests::UnhelpfulIndex >();
|
||||
add< QueryPlanSetTests::SingleException >();
|
||||
add< QueryPlanSetTests::AllException >();
|
||||
// add< FieldBoundTests::Empty >();
|
||||
// add< FieldBoundTests::Eq >();
|
||||
// add< FieldBoundTests::DupEq >();
|
||||
// add< FieldBoundTests::Lt >();
|
||||
// add< FieldBoundTests::Lte >();
|
||||
// add< FieldBoundTests::Gt >();
|
||||
// add< FieldBoundTests::Gte >();
|
||||
// add< FieldBoundTests::TwoLt >();
|
||||
// add< FieldBoundTests::TwoGt >();
|
||||
// add< FieldBoundTests::EqGte >();
|
||||
// add< FieldBoundTests::EqGteInvalid >();
|
||||
// add< FieldBoundTests::Regex >();
|
||||
// add< FieldBoundTests::UnhelpfulRegex >();
|
||||
// add< FieldBoundTests::In >();
|
||||
// add< FieldBoundTests::Equality >();
|
||||
// add< FieldBoundTests::SimplifiedQuery >();
|
||||
// add< FieldBoundTests::QueryPatternTest >();
|
||||
// add< FieldBoundTests::NoWhere >();
|
||||
// add< FieldBoundTests::Numeric >();
|
||||
// add< QueryPlanTests::NoIndex >();
|
||||
// add< QueryPlanTests::SimpleOrder >();
|
||||
// add< QueryPlanTests::MoreIndexThanNeeded >();
|
||||
// add< QueryPlanTests::IndexSigns >();
|
||||
// add< QueryPlanTests::IndexReverse >();
|
||||
// add< QueryPlanTests::NoOrder >();
|
||||
// add< QueryPlanTests::EqualWithOrder >();
|
||||
// add< QueryPlanTests::Optimal >();
|
||||
// add< QueryPlanTests::MoreOptimal >();
|
||||
// add< QueryPlanTests::KeyMatch >();
|
||||
// add< QueryPlanTests::ExactKeyQueryTypes >();
|
||||
// add< QueryPlanTests::Unhelpful >();
|
||||
// add< QueryPlanSetTests::NoIndexes >();
|
||||
// add< QueryPlanSetTests::Optimal >();
|
||||
// add< QueryPlanSetTests::NoOptimal >();
|
||||
// add< QueryPlanSetTests::NoSpec >();
|
||||
// add< QueryPlanSetTests::HintSpec >();
|
||||
// add< QueryPlanSetTests::HintName >();
|
||||
// add< QueryPlanSetTests::NaturalHint >();
|
||||
// add< QueryPlanSetTests::NaturalSort >();
|
||||
// add< QueryPlanSetTests::BadHint >();
|
||||
// add< QueryPlanSetTests::Count >();
|
||||
// add< QueryPlanSetTests::QueryMissingNs >();
|
||||
// add< QueryPlanSetTests::UnhelpfulIndex >();
|
||||
// add< QueryPlanSetTests::SingleException >();
|
||||
// add< QueryPlanSetTests::AllException >();
|
||||
add< QueryPlanSetTests::SaveGoodIndex >();
|
||||
add< QueryPlanSetTests::TryAllPlansOnErr >();
|
||||
add< QueryPlanSetTests::FindOne >();
|
||||
add< QueryPlanSetTests::Delete >();
|
||||
add< QueryPlanSetTests::DeleteOneScan >();
|
||||
add< QueryPlanSetTests::DeleteOneIndex >();
|
||||
add< QueryPlanSetTests::TryOtherPlansBeforeFinish >();
|
||||
// add< QueryPlanSetTests::TryAllPlansOnErr >();
|
||||
// add< QueryPlanSetTests::FindOne >();
|
||||
// add< QueryPlanSetTests::Delete >();
|
||||
// add< QueryPlanSetTests::DeleteOneScan >();
|
||||
// add< QueryPlanSetTests::DeleteOneIndex >();
|
||||
// add< QueryPlanSetTests::TryOtherPlansBeforeFinish >();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user