summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 5d2da0f46eb..8404d777334 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1839,10 +1839,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
be updated as if this is an UPDATE.
*/
if (different_records && table->default_field)
- {
- if (table->update_default_fields(1, info->ignore))
- goto err;
- }
+ table->evaluate_update_default_function();
/* CHECK OPTION for VIEW ... ON DUPLICATE KEY UPDATE ... */
res= info->table_list->view_check_option(table->in_use, info->ignore);
@@ -2626,7 +2623,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
{
bool error_reported= FALSE;
if (unlikely(parse_vcol_defs(client_thd, client_thd->mem_root, copy,
- &error_reported)))
+ &error_reported,
+ VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING)))
goto error;
}
@@ -3871,7 +3869,7 @@ int select_insert::send_data(List<Item> &values)
thd->count_cuted_fields= CHECK_FIELD_WARN; // Calculate cuted fields
store_values(values);
if (table->default_field &&
- unlikely(table->update_default_fields(0, info.ignore)))
+ unlikely(table->update_default_fields(info.ignore)))
DBUG_RETURN(1);
thd->count_cuted_fields= CHECK_FIELD_ERROR_FOR_NULL;
if (unlikely(thd->is_error()))