Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16630

Ambiguous error message when check constraint matches table name

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.2.17, 10.3.9
    • Component/s: Server
    • Labels:
      None

      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
      

        Attachments

          Activity

            People

            • Assignee:
              anel Anel Husakovic
              Reporter:
              cvicentiu Vicențiu Ciorbaru
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: