mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -3962,9 +3962,7 @@ int select_insert::send_data(List<Item> &values)
|
||||
DBUG_RETURN(0);
|
||||
|
||||
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
|
||||
store_values(values);
|
||||
if (table->default_field &&
|
||||
unlikely(table->update_default_fields(info.ignore)))
|
||||
if (store_values(values, info.ignore))
|
||||
DBUG_RETURN(1);
|
||||
thd->count_cuted_fields= CHECK_FIELD_ERROR_FOR_NULL;
|
||||
if (unlikely(thd->is_error()))
|
||||
@ -4022,18 +4020,19 @@ int select_insert::send_data(List<Item> &values)
|
||||
}
|
||||
|
||||
|
||||
void select_insert::store_values(List<Item> &values)
|
||||
bool select_insert::store_values(List<Item> &values, bool ignore_errors)
|
||||
{
|
||||
DBUG_ENTER("select_insert::store_values");
|
||||
bool error;
|
||||
|
||||
if (fields->elements)
|
||||
fill_record_n_invoke_before_triggers(thd, table, *fields, values, 1,
|
||||
TRG_EVENT_INSERT);
|
||||
error= fill_record_n_invoke_before_triggers(thd, table, *fields, values,
|
||||
ignore_errors, TRG_EVENT_INSERT);
|
||||
else
|
||||
fill_record_n_invoke_before_triggers(thd, table, table->field_to_fill(),
|
||||
values, 1, TRG_EVENT_INSERT);
|
||||
error= fill_record_n_invoke_before_triggers(thd, table, table->field_to_fill(),
|
||||
values, ignore_errors, TRG_EVENT_INSERT);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
bool select_insert::prepare_eof()
|
||||
@ -4710,10 +4709,10 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
|
||||
return result;
|
||||
}
|
||||
|
||||
void select_create::store_values(List<Item> &values)
|
||||
bool select_create::store_values(List<Item> &values, bool ignore_errors)
|
||||
{
|
||||
fill_record_n_invoke_before_triggers(thd, table, field, values, 1,
|
||||
TRG_EVENT_INSERT);
|
||||
return fill_record_n_invoke_before_triggers(thd, table, field, values,
|
||||
ignore_errors, TRG_EVENT_INSERT);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user