~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_update.cc

merged with latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
    return;
74
74
 
75
75
  /* Create unique_map with all fields used by that index. */
76
 
  unique_map.init(unique_map_buf, table->getMutableShare()->fields);
 
76
  unique_map.init(unique_map_buf, table->getMutableShare()->sizeFields());
77
77
  table->mark_columns_used_by_index_no_reset(keynr, &unique_map);
78
78
 
79
79
  /* Subtract read_set and write_set. */
95
95
  /* Read record that is identified by table->cursor->ref. */
96
96
  (void) table->cursor->rnd_pos(table->record[1], table->cursor->ref);
97
97
  /* Copy the newly read columns into the new record. */
98
 
  for (field_p= table->field; (field= *field_p); field_p++)
 
98
  for (field_p= table->getFields(); (field= *field_p); field_p++)
 
99
  {
99
100
    if (unique_map.isBitSet(field->field_index))
 
101
    {
100
102
      field->copy_from_tmp(table->getShare()->rec_buff_length);
 
103
    }
 
104
  }
 
105
 
101
106
 
102
107
  return;
103
108
}
293
298
      ha_rows examined_rows;
294
299
 
295
300
      table->sort.io_cache = new internal::IO_CACHE;
296
 
      memset(table->sort.io_cache, 0, sizeof(internal::IO_CACHE));
297
301
 
298
302
      if (!(sortorder=make_unireg_sortorder(order, &length, NULL)) ||
299
303
          (table->sort.found_records= filesort(session, table, sortorder, length,