SERVER-2163

This commit is contained in:
Dwight
2010-11-30 13:55:29 -05:00
parent 08897a56a7
commit 64bc8df4af
2 changed files with 18 additions and 8 deletions

View File

@@ -1049,9 +1049,14 @@ const StringData _jscode_raw_utils =
"return res;\n"
"}\n"
"\n"
"shellHelper.use = function( dbname ){\n"
"db = db.getMongo().getDB( dbname );\n"
"print( \"switched to db \" + db.getName() );\n"
"shellHelper.use = function (dbname) {\n"
"var s = \"\" + dbname;\n"
"if (s == \"\") {\n"
"print(\"bad use parameter\");\n"
"return;\n"
"}\n"
"db = db.getMongo().getDB(dbname);\n"
"print(\"switched to db \" + db.getName());\n"
"}\n"
"\n"
"shellHelper.it = function(){\n"