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

Upsert allows insertion of doc with illegally indexed parallel arrays

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.5.5
    • 2.5.4
    • Write Ops
    • None
    • ALL

    Description

      var t = db.upsert_bad_index;
      t.drop();
      t.ensureIndex({a: 1, b: 1});
      var res = t.save({_id: 1, a: [1, 2, 3], b: [4, 5, 6]});
      printjson(res);
      printjson(t.validate().keysPerIndex)
      assert.eq(0, t.find().itcount());

      Attachments

        Activity

          People

            dan@mongodb.com Daniel Pasette (Inactive)
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: