Skip to content

Commit 8ee071a

Browse files
committed
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
1 parent 826f615 commit 8ee071a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

sql/sql_base.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8115,11 +8115,8 @@ fill_record(THD *thd, TABLE *table_arg, List<Item> &fields, List<Item> &values,
81158115
thus we safely can take table from the first field.
81168116
*/
81178117
fld= (Item_field*)f++;
8118-
if (!(field= fld->field_for_view_update()))
8119-
{
8120-
my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), fld->name.str);
8121-
goto err;
8122-
}
8118+
field= fld->field_for_view_update();
8119+
DBUG_ASSERT(field);
81238120
DBUG_ASSERT(field->field->table == table_arg);
81248121
table_arg->auto_increment_field_not_null= FALSE;
81258122
f.rewind();

0 commit comments

Comments
 (0)