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

Any collection name on db w/corresponding function name fail

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Shell
    • None
    • ALL

    Description

      For example the config.version collection in sharding config is not accessible from the shell since the version function is returned.

      We should check if the collection exists before returning the function:

      > use config
      switched to db config
      > db["version"].find()
      Wed Mar 16 08:23:22 TypeError: db.version.find is not a function (shell):1
      > db["version"]
      function ()

      { return this.serverBuildInfo().version; } If there is a collection we should use that, and print a warning message about the naming conflict. $ mongoexport -d config -c version connected to: 127.0.0.1:37017 { "_id" : 1, "version" : 3 }

      exported 1 records

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: