1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '11.4' into 11.5

This commit is contained in:
Oleksandr Byelkin
2024-05-23 17:01:43 +02:00
1470 changed files with 43538 additions and 14960 deletions

View File

@ -249,7 +249,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");
/*
@ -1878,6 +1878,10 @@ int multi_update::prepare(List<Item> &not_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);
}
@ -2377,7 +2381,7 @@ int multi_update::send_data(List<Item> &not_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]);
@ -2506,8 +2510,6 @@ int multi_update::do_updates()
table = cur_table->table;
if (table == table_to_update)
continue; // Already updated
if (table->file->pushed_rowid_filter)
table->file->disable_pushed_rowid_filter();
org_updated= updated;
tmp_table= tmp_tables[cur_table->shared];
tmp_table->file->extra(HA_EXTRA_CACHE); // Change to read cache
@ -2701,9 +2703,7 @@ int multi_update::do_updates()
(void) tmp_table->file->ha_rnd_end();
check_opt_it.rewind();
while (TABLE *tbl= check_opt_it++)
tbl->file->ha_rnd_end();
if (table->file->save_pushed_rowid_filter)
table->file->enable_pushed_rowid_filter();
tbl->file->ha_rnd_end();
}
DBUG_RETURN(0);
@ -2714,8 +2714,6 @@ err:
}
err2:
if (table->file->save_pushed_rowid_filter)
table->file->enable_pushed_rowid_filter();
if (table->file->inited)
(void) table->file->ha_rnd_end();
if (tmp_table->file->inited)