From 8ee071a22d6ba69177d8f75509425c06a630d6f5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 11 Jan 2018 23:04:49 +0100 Subject: [PATCH] cleanup: remove redundant check it's already checked before the update loop (see check_fields()), and this condition cannot suddenly become false in the middle of the statement --- sql/sql_base.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 3c913f83530..6178dd3ac6a 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -8115,11 +8115,8 @@ fill_record(THD *thd, TABLE *table_arg, List &fields, List &values, thus we safely can take table from the first field. */ fld= (Item_field*)f++; - if (!(field= fld->field_for_view_update())) - { - my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), fld->name.str); - goto err; - } + field= fld->field_for_view_update(); + DBUG_ASSERT(field); DBUG_ASSERT(field->field->table == table_arg); table_arg->auto_increment_field_not_null= FALSE; f.rewind();