Now forward startLoc, with test

This commit is contained in:
Aaron
2009-03-18 17:50:45 -04:00
parent 6d10afbd49
commit cc83107966
3 changed files with 21 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ namespace mongo {
if ( !fbs_.matchPossible() )
return auto_ptr< Cursor >( new BasicCursor( DiskLoc() ) );
if ( !index_ )
return findTableScan( fbs_.ns(), order_ );
return findTableScan( fbs_.ns(), order_, startLoc );
massert( "newCursor() with start location not implemented for indexed plans", startLoc.isNull() );
//TODO This constructor should really take a const ref to the index details.
return auto_ptr< Cursor >( new BtreeCursor( *const_cast< IndexDetails* >( index_ ), startKey_, endKey_, direction_ >= 0 ? 1 : -1 ) );