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

SQL: insert delayed fix [#365 bug 3]

Affected tests (forced mode): rpl.rpl_timezone
This commit is contained in:
Aleksey Midenkov
2017-11-29 11:57:52 +03:00
parent 8d548f8e86
commit 2305666a05
7 changed files with 36 additions and 20 deletions

View File

@ -683,7 +683,7 @@ Field **TABLE::field_to_fill()
inline
Field **TABLE::user_fields()
Field **TABLE::vers_user_field_to_fill()
{
if (versioned())
{
@ -1019,7 +1019,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
}
table->reset_default_fields();
if (fill_record_n_invoke_before_triggers(thd, table,
table->user_fields(),
table->vers_user_field_to_fill(),
*values, 0, TRG_EVENT_INSERT))
{
if (values_list.elements != 1 && ! thd->is_error())
@ -2597,6 +2597,9 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
}
*field=0;
if (copy->versioned() && copy->vers_update_user_field())
goto error;
if (share->virtual_fields || share->default_expressions ||
share->default_fields)
{
@ -3892,7 +3895,7 @@ void select_insert::store_values(List<Item> &values)
fill_record_n_invoke_before_triggers(thd, table, *fields, values, 1,
TRG_EVENT_INSERT);
else
fill_record_n_invoke_before_triggers(thd, table, table->user_fields(),
fill_record_n_invoke_before_triggers(thd, table, table->vers_user_field_to_fill(),
values, 1, TRG_EVENT_INSERT);
DBUG_VOID_RETURN;