mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
handle edge case
This commit is contained in:
parent
dfda4ccc39
commit
d0d19f97cf
@ -149,8 +149,10 @@ namespace mongo {
|
||||
if ( finalLong != tempLong ){
|
||||
dblock l;
|
||||
db.dropCollection( finalLong );
|
||||
BSONObj info;
|
||||
uassert( "rename failed" , db.runCommand( "admin" , BSON( "renameCollection" << tempLong << "to" << finalLong ) , info ) );
|
||||
if ( db.count( tempLong ) ){
|
||||
BSONObj info;
|
||||
uassert( "rename failed" , db.runCommand( "admin" , BSON( "renameCollection" << tempLong << "to" << finalLong ) , info ) );
|
||||
}
|
||||
}
|
||||
return db.count( finalLong );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user