summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index c092faa986b..3533c241fbc 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -8889,8 +8889,7 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
rfield->field_index == table->next_number_field->field_index)
table->auto_increment_field_not_null= TRUE;
if (rfield->vcol_info &&
- value->type() != Item::DEFAULT_VALUE_ITEM &&
- value->type() != Item::NULL_ITEM &&
+ !value->vcol_assignment_allowed_value() &&
table->s->table_category != TABLE_CATEGORY_TEMPORARY)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
@@ -9098,8 +9097,7 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
if (field->field_index == autoinc_index)
table->auto_increment_field_not_null= TRUE;
if (field->vcol_info &&
- value->type() != Item::DEFAULT_VALUE_ITEM &&
- value->type() != Item::NULL_ITEM &&
+ !value->vcol_assignment_allowed_value() &&
table->s->table_category != TABLE_CATEGORY_TEMPORARY)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,