create or replace schema update_bug_example;

use update_bug_example;

create table entity_type
( 
    id              bigint not null,
    primary key (id)
);

create table entity
(
    id              bigint not null,
    start_date      date not null,
    id_entity_type  bigint not null,
    primary key (id),
    foreign key fk_entity_type (id_entity_type) references entity_type (id)
);

insert
into entity_type
(
    id
)
values
(   1);

insert
into entity
(
    id,
    start_date,
    id_entity_type
)
values
(   1,  current_date,   1),
(   2,  current_date,   1);

update
    entity e
    inner join entity_type et
        on  e.id_entity_type    = et.id
set
    e.start_date = e.start_date + interval 1 day;

select row_count();