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:
@ -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;
|
||||
|
Reference in New Issue
Block a user