[MDEV-16630] Ambiguous error message when check constraint matches table name Created: 2018-06-30  Updated: 2021-03-02  Resolved: 2018-07-01

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: None
Fix Version/s: 10.2.17, 10.3.9

Type: Bug Priority: Major
Reporter: Vicențiu Ciorbaru Assignee: Anel Husakovic
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-24598 duplicate CHECK constraint name In Review

 Description   

We currently have 2 types of check constraints.

Field check constraints and table check constraints. If a column with a check constraint has the same name as a table check constraint for the same table, it is impossible to tell which check constraint failed.

create table test.t(a int, b int check(b>0),
                    constraint b check(a<b));

For either of the checks in the above table, the error message is:

CONSTRAINT b failed for test.t



 Comments   
Comment by Anel Husakovic [ 2018-07-01 ]

Fixed with 8639e288086247ce39917f4cb55191c8bb5b5a8c

Generated at Thu Feb 08 08:30:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.