Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6, 10.6.25
-
None
Description
Running the following SQL as a reproducer will show the problem:
create table TemporalEntity1 ( |
id bigint not null, |
excluded bigint not null, |
text varchar(255), |
version integer not null, |
effective_from timestamp(6) not null, |
effective_to timestamp(6) null, |
primary key (id, version), |
check (effective_to is null or effective_to > effective_from) |
) engine=InnoDB;
|
|
|
|
|
insert into TemporalEntity1 |
(excluded, text, version, effective_from, effective_to, id)
|
values
|
(1, 'hello', 0, timestamp '2026-03-31T17:11:53.488209', null, 1); |
|
|
update TemporalEntity1 |
set
|
effective_to=timestamp '2026-03-31T17:11:54.797437' |
where
|
id=1
|
and effective_to is null |
and version=0; |
Clearly, 2026-03-31T17:11:54.797437 is greater than 2026-03-31T17:11:53.488209, but MariaDB reports CONSTRAINT `CONSTRAINT_1` failed for `TemporalEntity1`.
It works fine in version 10.11+