0
0
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:
Dwight 2009-02-10 17:42:31 -05:00
parent 6c62dd105d
commit 9cc79db551
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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 + "]";