[MDEV-22506] Malformed error message for ER_KEY_CONTAINS_PERIOD_FIELDS Created: 2020-05-08  Updated: 2020-11-02  Resolved: 2020-11-02

Status: Closed
Project: MariaDB Server
Component/s: Versioned Tables
Affects Version/s: 10.5
Fix Version/s: 10.5.7

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Nikita Malyavin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates

 Description   

10.5 f544a712

MariaDB [test]> create or replace table t1 (a int, s date, e date, period for p(s,e), primary key(a, s, p without overlaps));
ERROR 4170 (HY000): Key `(null)` cannot explicitly include column `s`
 
MariaDB [test]> create or replace table t1 (a int, s date, e date, period for p(s,e), unique(a, s, p without overlaps));
ERROR 4170 (HY000): Key `(null)` cannot explicitly include column `s`

It only populates the name when it is explicitly provided:

MariaDB [test]> create or replace table t1 (a int, s date, e date, period for p(s,e), unique ind(a, s, p without overlaps));
ERROR 4170 (HY000): Key `ind` cannot explicitly include column `s`

Of course it is not always done for UNIQUE and almost never done for PRIMARY KEY (as an explicit name for primary key is ignored and causes a warning).



 Comments   
Comment by Oleksandr Byelkin [ 2020-10-23 ]

Add please tests and description to append_system_key_parts() and can push, if it is impossible lets discuss it.

Generated at Thu Feb 08 09:15:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.