bail out or clause checking if we do an unpredicted table scan
This commit is contained in:
@@ -641,7 +641,8 @@ namespace mongo {
|
||||
_honorRecordedPlan( honorRecordedPlan ),
|
||||
_bestGuessOnly( bestGuessOnly ),
|
||||
_hint( ( hint && !hint->eoo() ) ? hint->wrap() : BSONObj() ),
|
||||
_mayYield( mayYield )
|
||||
_mayYield( mayYield ),
|
||||
_tableScanned()
|
||||
{
|
||||
if ( !order.isEmpty() || !min.isEmpty() || !max.isEmpty() || !_fros.getSpecial().empty() ) {
|
||||
_or = false;
|
||||
@@ -670,6 +671,9 @@ namespace mongo {
|
||||
BSONElement hintElt = _hint.firstElement();
|
||||
_currentQps.reset( new QueryPlanSet( _ns, frs, _query, BSONObj(), &hintElt, _honorRecordedPlan, BSONObj(), BSONObj(), _bestGuessOnly, _mayYield ) );
|
||||
shared_ptr< QueryOp > ret( _currentQps->runOp( op ) );
|
||||
if ( ret->qp().willScanTable() ) {
|
||||
_tableScanned = true;
|
||||
}
|
||||
_fros.popOrClause();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user