mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
fix a bug with dup _id keys, but fix is in comments for tonight
make show dbs pretty
This commit is contained in:
parent
6c62dd105d
commit
9cc79db551
@ -325,6 +325,7 @@ namespace mongo {
|
||||
KeyNode M = keyNode(m);
|
||||
int x = key.woCompare(M.key, order);
|
||||
if ( x == 0 ) {
|
||||
//uassert("duplicate key error", k(m).isUnused() || !assertIfDup);
|
||||
uassert("duplicate key error", !assertIfDup);
|
||||
|
||||
// dup keys allowed. use recordLoc as if it is part of the key
|
||||
|
@ -223,8 +223,10 @@ shellHelper.show = function( what ){
|
||||
return "";
|
||||
}
|
||||
|
||||
if ( what == "dbs" )
|
||||
return db.getMongo().getDBNames();
|
||||
if ( what == "dbs" ) {
|
||||
db.getMongo().getDBNames().sort().forEach( function(x){print(x)} );
|
||||
return "";
|
||||
}
|
||||
|
||||
throw "don't know how to show [" + what + "]";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user