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

renameCollection wrapper accepts wrong arguments and fails silently

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.0.7
    • Fix Version/s: 3.3.14
    • Component/s: Shell
    • Labels:
    • Environment:
      Linux
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Platforms 2016-09-19

      Description

      Trying to use renameCollection, I mistakenly mixed the syntax of the renameCollection and the wrapper function db.collection.renameCollection().

      I typed > db.source-collection.renameCollection(

      { to : "target-collection", dropTarget : true }

      )

      And then, the "source-collection" disappeared, and a new one appeared and is listed as "[object Object]" with db.getCollectionNames().

      Apparently the collection was renamed after the first argument of the wrapper.

        Attachments

          Activity

            People

            Assignee:
            matt.cotter Matt Cotter
            Reporter:
            miagao Luciano Issoe
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: