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

Comment in checkAuthForRenameCollectionCommand doesn't match behavior

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 3.5.12
    • None
    • Security
    • None
    • Fully Compatible

    Description

      The comment in checkAuthForRenameCollectionCommands (https://github.com/mongodb/mongo/blob/r3.5.9/src/mongo/db/commands/rename_collection_common.cpp?utf8=%E2%9C%93#L63-L66) says that "if you have renameCollectionSameDB and either can read both of source and dest collections or can't read either of source or dest collection", you can do the rename. However, this doesn't match the behavior in line 82. After talking with Spencer Brody and Spencer Jackson, it seems the code is correct, but the comment is not.

      Attachments

        Activity

          People

            sam.dunietz Sam Dunietz
            sam.dunietz Sam Dunietz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: