1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.6 into 10.11

This commit is contained in:
Marko Mäkelä
2024-02-14 16:12:53 +02:00
165 changed files with 3458 additions and 2319 deletions

View File

@@ -9212,6 +9212,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
@@ -9225,7 +9228,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;
@@ -9265,6 +9268,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);
@@ -9341,7 +9348,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) ||