mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@ -8807,6 +8807,9 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table,
|
||||
@param values values to fill with
|
||||
@param ignore_errors TRUE if we should ignore errors
|
||||
@param use_value forces usage of value of the items instead of result
|
||||
@param check_for_computability whether to check for ability to invoke val_*()
|
||||
methods (val_int () etc) against supplied
|
||||
values
|
||||
|
||||
@details
|
||||
fill_record() may set table->auto_increment_field_not_null and a
|
||||
@ -8820,7 +8823,7 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table,
|
||||
|
||||
bool
|
||||
fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
|
||||
bool ignore_errors, bool use_value)
|
||||
bool ignore_errors, bool use_value, bool check_for_computability)
|
||||
{
|
||||
List_iterator_fast<Item> v(values);
|
||||
List<TABLE> tbl_list;
|
||||
@ -8858,6 +8861,10 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
|
||||
|
||||
value=v++;
|
||||
|
||||
if (check_for_computability &&
|
||||
value->check_is_evaluable_expression_or_error())
|
||||
goto err;
|
||||
|
||||
bool vers_sys_field= table->versioned() && field->vers_sys_field();
|
||||
|
||||
if (field->field_index == autoinc_index)
|
||||
@ -8932,7 +8939,7 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table, Field **ptr,
|
||||
bool result;
|
||||
Table_triggers_list *triggers= table->triggers;
|
||||
|
||||
result= fill_record(thd, table, ptr, values, ignore_errors, FALSE);
|
||||
result= fill_record(thd, table, ptr, values, ignore_errors, false, false);
|
||||
|
||||
if (!result && triggers && *ptr)
|
||||
result= triggers->process_triggers(thd, event, TRG_ACTION_BEFORE, TRUE) ||
|
||||
|
Reference in New Issue
Block a user