1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2023-09-11 14:46:39 +03:00
98 changed files with 1125 additions and 22817 deletions

View File

@@ -7311,7 +7311,7 @@ Rows_log_event::write_row(rpl_group_info *rgi,
DBUG_RETURN(error);
}
if (m_curr_row == m_rows_buf && !invoke_triggers)
if (m_curr_row == m_rows_buf && !invoke_triggers && !table->s->long_unique_table)
{
/*
This table has no triggers so we can do bulk insert.
@@ -7344,6 +7344,9 @@ Rows_log_event::write_row(rpl_group_info *rgi,
DBUG_PRINT_BITSET("debug", "rpl_write_set: %s", table->rpl_write_set);
DBUG_PRINT_BITSET("debug", "read_set: %s", table->read_set);
if (table->s->long_unique_table)
table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE);
if (invoke_triggers &&
unlikely(process_triggers(TRG_EVENT_INSERT, TRG_ACTION_BEFORE, TRUE)))
{
@@ -7455,7 +7458,14 @@ Rows_log_event::write_row(rpl_group_info *rgi,
Now, record[1] should contain the offending row. That
will enable us to update it or, alternatively, delete it (so
that we can insert the new row afterwards).
*/
*/
if (table->s->long_unique_table)
{
/* same as for REPLACE/ODKU */
table->move_fields(table->field, table->record[1], table->record[0]);
table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_REPLACE);
table->move_fields(table->field, table->record[0], table->record[1]);
}
/*
If row is incomplete we will use the record found to fill
@@ -7465,6 +7475,8 @@ Rows_log_event::write_row(rpl_group_info *rgi,
{
restore_record(table,record[1]);
error= unpack_current_row(rgi);
if (table->s->long_unique_table)
table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE);
}
DBUG_PRINT("debug",("preparing for update: before and after image"));
@@ -8477,6 +8489,8 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
thd_proc_info(thd, message);
if (unlikely((error= unpack_current_row(rgi, &m_cols_ai))))
goto err;
if (m_table->s->long_unique_table)
m_table->update_virtual_fields(m_table->file, VCOL_UPDATE_FOR_WRITE);
/*
Now we have the right row to update. The old row (the one we're