diff options
author | Dwight <dmerriman@gmail.com> | 2009-02-10 17:42:31 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-02-10 17:42:31 -0500 |
commit | 9cc79db5518123e239e3de3b8d82cab960b0d603 (patch) | |
tree | a71fa7ce44f6a632d428e58e849985a838e67bf0 | |
parent | 6c62dd105dc8c397b4e36dececa2062b4c8a8c8e (diff) | |
download | mongo-9cc79db5518123e239e3de3b8d82cab960b0d603.tar.gz |
fix a bug with dup _id keys, but fix is in comments for tonight
make show dbs pretty
-rw-r--r-- | db/btree.cpp | 1 | ||||
-rw-r--r-- | shell/utils.js | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/db/btree.cpp b/db/btree.cpp index 64f84c9ca83..1c25a5959bd 100644 --- a/db/btree.cpp +++ b/db/btree.cpp @@ -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 diff --git a/shell/utils.js b/shell/utils.js index 10167667cb0..2a91a496b35 100644 --- a/shell/utils.js +++ b/shell/utils.js @@ -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 + "]"; |