Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5
-
None
Description
create or replace table t1 (a int, s date, e date, period for p(s,e), primary key (a, p without overlaps)); |
insert into t1 values (1,'2012-01-01','2020-01-01'); |
insert into t1 values (1,'2016-06-06','2018-08-08'); |
10.5 f544a712 |
ERROR 1062 (23000): Duplicate entry '1-2018-08-08-2016-06-06' for key 'PRIMARY' |
There should be an error, as the value of a is the same and periods overlap. Whether it should be the ER_DUP_ENTRY is arguable. We discussed it and agreed to disagree, so apparently it will remain such.
But the error message is undeniably wrong. There is no duplicate entry 1-2018-08-08-2016-06-06. This is going to be very confusing to whoever uses the feature. It needs to be changed to something more sensible.