Skip to content

Commit

Permalink
SERVER-3064 out for now - too many issues with rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Aug 6, 2011
1 parent bd1ed81 commit 7cc114b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 9 additions & 3 deletions db/queryoptimizer.cpp
Expand Up @@ -219,9 +219,15 @@ namespace mongo {
// we disallow as its a common user error // we disallow as its a common user error
// .system. and local collections are exempt // .system. and local collections are exempt
if ( _d && _d->capped && _frs.range( "_id" ).nontrivial() ) { if ( _d && _d->capped && _frs.range( "_id" ).nontrivial() ) {
uassert( 14820, "doing _id query on a capped collection without an index is not allowed" , if ( cc().isSyncThread() ||
str::contains( _frs.ns() , ".system." ) || str::contains( _frs.ns() , ".system." ) ||
str::startsWith( _frs.ns() , "local." ) ); str::startsWith( _frs.ns() , "local." ) ) {
// ok
}
else {
warning() << "_id query on capped collection without an _id index, performance will be poor collection: " << _frs.ns() << endl;
//uassert( 14820, str::stream() << "doing _id query on a capped collection without an index is not allowed: " << _frs.ns() ,
}
} }
} }
return findTableScan( _frs.ns(), _order, startLoc ); return findTableScan( _frs.ns(), _order, startLoc );
Expand Down
5 changes: 3 additions & 2 deletions jstests/cappeda.js
Expand Up @@ -20,8 +20,9 @@ function u() {
} }




assert.throws( q , [] , "A1" ); // SERVER-3064
assert.throws( u , [] , "B1" ); //assert.throws( q , [] , "A1" );
//assert.throws( u , [] , "B1" );


t.ensureIndex( { _id : 1 } ) t.ensureIndex( { _id : 1 } )


Expand Down

0 comments on commit 7cc114b

Please sign in to comment.