summaryrefslogtreecommitdiff
path: root/src/mongo/shell
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2018-02-23 03:30:43 +0000
committerKevin Pulo <kevin.pulo@mongodb.com>2018-02-23 04:21:11 +0000
commit1af47155814e1628b92597a58ed489b7509b6425 (patch)
tree39f835552cd4e988fc79a7298f18a0fec47bd459 /src/mongo/shell
parentadfa37c74e716826cde8b7bb1ebbe9e6c99d77d4 (diff)
downloadmongo-1af47155814e1628b92597a58ed489b7509b6425.tar.gz
SERVER-33227 don't modify global `db` in shell `connect()`
Diffstat (limited to 'src/mongo/shell')
-rw-r--r--src/mongo/shell/mongo.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/mongo.js b/src/mongo/shell/mongo.js
index e789e284795..c8d7720c105 100644
--- a/src/mongo/shell/mongo.js
+++ b/src/mongo/shell/mongo.js
@@ -249,7 +249,7 @@ connect = function(url, user, pass) {
chatty("connecting to: " + url);
var m = new Mongo(url);
- db = m.getDB(m.defaultDB);
+ var db = m.getDB(m.defaultDB);
if (user && pass) {
if (!db.auth(user, pass)) {