Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2249

mongodump panics if collection doesn't exist

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.11
    • mongodump
    • None

    Description

      If mongodump is run with a database/collection that doesn't exist, it panics with a nil pointer dereference. From a quick look, I think this is because GetCollectionInfo on prepare.go line 227 can return nil if the collection isn't found, but this isn't checked anywhere. A similar problem was addressed in the mongoexport port to the new driver by checking if the collection exists before exporting any documents.

      Attachments

        Activity

          People

            divjot.arora@mongodb.com Divjot Arora
            divjot.arora@mongodb.com Divjot Arora
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: