Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3119

shell prompt is incorrectly changed after creating a new Mongo object

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.8.1
    • Shell
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: