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

Getting need to login error when trying to restore a single database

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.1, 2.3.0
    • Affects Version/s: 2.2.0
    • Component/s: Tools
    • None
    • ALL

      Server complains that user needs to login even if it specified the right username and password for the database. Offending code in createIndex (@restore.cpp):

      BSONObj err = conn().getLastErrorDetailed(false, false, _w);
      

      The problem with the code above is getLastErrorDetailed would always run the command against the admin database, and if the user specified a database (through the -d parameter) other than admin, then this will not work.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: