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

Ambiguous error message when check constraint matches table name

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 10.2.17, 10.3.9
    • Server
    • 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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.