mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.11 into 11.0
This commit is contained in:
@@ -9213,6 +9213,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
|
||||
@@ -9226,7 +9229,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;
|
||||
@@ -9266,6 +9269,10 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
|
||||
/* Ensure the end of the list of values is not reached */
|
||||
DBUG_ASSERT(value);
|
||||
|
||||
if (check_for_computability &&
|
||||
value->check_is_evaluable_expression_or_error())
|
||||
goto err;
|
||||
|
||||
const bool skip_sys_field= field->vers_sys_field() &&
|
||||
!thd->vers_insert_history_fast(table);
|
||||
|
||||
@@ -9342,7 +9349,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