code: func (e *InsertExec) updateDupKeyValues(oldHandle int64, newHandle int64,
  	handleChanged bool, oldRow []types.Datum, updatedRow []types.Datum) error {
  	// There is only one row per update.
  	fillBackKeysInRows, err := e.getKeysNeedCheck(e.ctx, e.Table, [][]types.Datum{updatedRow})
  	if err != nil {
  		return err
  	}
  	// Delete old keys and fill back new key-values of the updated row.
  	err = e.deleteDupKeys(e.ctx, e.Table, [][]types.Datum{oldRow})
  	if err != nil {
  		return err
  	}
  
  	if handleChanged {
  		delete(e.dupOldRowValues, string(e.Table.RecordKey(oldHandle)))
  		e.fillBackKeys(e.Table, fillBackKeysInRows[0], newHandle)
  	} else {
  		e.fillBackKeys(e.Table, fillBackKeysInRows[0], oldHandle)
  	}
  	return nil
  }
docs: // updateDupKeyValues updates the dupKeyValues for further duplicate key check.