From cef9cd4d98e15dd3ed2b94939e45578335c7876f Mon Sep 17 00:00:00 2001 From: Max Hirschhorn Date: Wed, 30 Aug 2017 17:57:20 -0400 Subject: SERVER-30903 Fix shellHelper.use() and setting global `db` object. --- src/mongo/shell/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); }; -- cgit v1.2.1