Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
1.8.1
-
None
-
Fully Compatible
-
ALL
Description
Problem:
It appears creating a new Mongo object in the shell causes the shell prompt to reflect the wrong hostname
/local/mongo/bin/mongo
MongoDB shell version: 1.8.1
connecting to: test
> use CL
switched to CL
> other = new Mongo("node401:27017").getDB("CL")
CL
Set401:PRIMARY>
The prompt is now reflecting the set and node connected through the new Mongo object, rather than the node its actually connected.
Solution:
Reset the prompt only when the shell is connect to a new node, not when a Mongo object is created as assigned to a variable.
Business Case:
- usability
Very easy to get confused if the prompt is incorrectly reporting the node you are connected to.