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

no error returned if an update $rename operation fails

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Write Ops
    • None
    • ALL

    Description

      renaming a->b if a DNE is not an error i guess. but the following is as it isn't allowed, yet no error set.
      > t.find()
      { "_id" : ObjectId("4df4da0dd5184551b584cf37"), "a" :

      { "c" : 3 }

      }
      > t.update({},{$rename:{"a.b":"top"}}); db.getLastErrorObj()
      {
      "updatedExisting" : true,
      "n" : 1,
      "connectionId" : 2,
      "err" : null,
      "ok" : 1
      }
      > t.find()
      { "_id" : ObjectId("4df4da0dd5184551b584cf37"), "a" :

      { "c" : 3 }

      }

      Attachments

        Activity

          People

            tonyh Tony Hannan
            dwight@mongodb.com Dwight Merriman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: