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

db.collection.remove('') removes all documents

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Server Tooling & Methods

      Running any of the following command removed all records from the table:

      • db.my_table.remove('')
      • db.my_table.remove('6717326742115057665')

      I would've expected these to both be rejected. I can't find anything in the documentation of collection.remove() that would indicate this is intended behavior.

      I verified this behavior using mongo shell v4.0.4 and mongodb v4.0.4.

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            gar@cambly.com Gar Higgins
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: