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

db.upgradeCheck() no longer checks all collections by default, and ignores db parameter

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc2
    • Affects Version/s: 2.6.0-rc1
    • Component/s: Shell
    • ALL

      In 2.6.0-rc1 db.upgradeCheck() will return an error if run with no parameters:

      > db.upgradeCheck()
      database 'test' for 2.6 upgrade compatibility
      
      Checking database test
      2014-03-11T13:18:19.859+1100 ReferenceError: dbName is not defined at src/mongo/shell/upgrade_check.js:141
      

      but if a dbname is specified, an error will be returned indicating a collection was not specified:

      > db.upgradeCheck({ db : "test" } )
      2014-03-11T13:19:16.004+1100 Error: When providing an argument to upgradeCheck, it must be of the form {collection: <collectionNameString>}. Otherwise, it will check every collection in the database. If you would like to check all databases, run db.upgradeCheckAllDbs() from the admin database. at src/mongo/shell/upgrade_check.js:132
      

      The db parameter is no longer being checked at all, only the collection. This makes it impossible to check a single database, only a collection in a database or all databases (with db.upgradeCheckAllDbs())

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            andre.defrere@mongodb.com Andre de Frere
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: