summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2017-08-30 17:57:20 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2017-08-30 17:57:20 -0400
commitcef9cd4d98e15dd3ed2b94939e45578335c7876f (patch)
treeb1a31e380062b41cc818e08f788ee0cf1c27fd17
parent8b02b6bcf172b9ff4c3dc7b01e886d650bb2ebc3 (diff)
downloadmongo-cef9cd4d98e15dd3ed2b94939e45578335c7876f.tar.gz
SERVER-30903 Fix shellHelper.use() and setting global `db` object.
-rw-r--r--src/mongo/shell/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index 2eb02eb1805..f31c476065b 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -678,7 +678,7 @@ shellHelper.use = function(dbname) {
print("bad use parameter");
return;
}
- db = db.getSession().getSiblingDB(dbname);
+ db = db.getSiblingDB(dbname);
print("switched to db " + db.getName());
};