diff options
Diffstat (limited to '')
-rw-r--r-- | sql/sql_update.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 145299ac..6acea2d5 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -257,7 +257,7 @@ static void prepare_record_for_error_message(int error, TABLE *table) Field *field; uint keynr; MY_BITMAP unique_map; /* Fields in offended unique. */ - my_bitmap_map unique_map_buf[bitmap_buffer_size(MAX_FIELDS)]; + my_bitmap_map unique_map_buf[bitmap_buffer_size(MAX_FIELDS)/sizeof(my_bitmap_map)]; DBUG_ENTER("prepare_record_for_error_message"); /* @@ -2182,6 +2182,10 @@ int multi_update::prepare(List<Item> ¬_used_values, { Item *value= value_it++; uint offset= item->field->table->pos_in_table_list->shared; + + if (value->associate_with_target_field(thd, item)) + DBUG_RETURN(1); + fields_for_table[offset]->push_back(item, thd->mem_root); values_for_table[offset]->push_back(value, thd->mem_root); } @@ -2680,7 +2684,7 @@ int multi_update::send_data(List<Item> ¬_used_values) tmp_table_param[offset].func_count); fill_record(thd, tmp_table, tmp_table->field + 1 + unupdated_check_opt_tables.elements, - *values_for_table[offset], TRUE, FALSE); + *values_for_table[offset], true, false, false); /* Write row, ignoring duplicated updates to a row */ error= tmp_table->file->ha_write_tmp_row(tmp_table->record[0]); |