create or replace table cars(id int unique auto_increment,
price int, s date, e date,
period for p(s,e),
primary key(id, p without overlaps));
has primary key as an autoincrement index! And as a consequence, the following fails:
insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
insert cars(price, s, e) values (1000, '2021-01-01', '2022-01-01');
update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
As you may guess, the same applies to the table t, if we'd add unique(a) - it doesn't become the autoincrement
index in the code, but the behavior is the same...