mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
sql_update.cc: always update default fields *after* compare_record()
(it was *after* in two cases and *before* in one case)
This commit is contained in:
parent
b52d4d0076
commit
815667086c
1 changed files with 5 additions and 2 deletions
|
@ -2047,8 +2047,7 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||
store_record(table,record[1]);
|
||||
if (fill_record_n_invoke_before_triggers(thd, table, *fields_for_table[offset],
|
||||
*values_for_table[offset], 0,
|
||||
TRG_EVENT_UPDATE) ||
|
||||
(table->default_field && table->update_default_fields()))
|
||||
TRG_EVENT_UPDATE))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
/*
|
||||
|
@ -2060,6 +2059,10 @@ int multi_update::send_data(List<Item> ¬_used_values)
|
|||
if (!can_compare_record || compare_record(table))
|
||||
{
|
||||
int error;
|
||||
|
||||
if (table->default_field && table->update_default_fields())
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if ((error= cur_table->view_check_option(thd, ignore)) !=
|
||||
VIEW_CHECK_OK)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue