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

Upsert allows insertion of doc with illegally indexed parallel arrays

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.5
    • Affects Version/s: 2.5.4
    • Component/s: Write Ops
    • Labels:
      None
    • ALL

      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());
      

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

              Created:
              Updated:
              Resolved: