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

Malformed error message for ER_KEY_CONTAINS_PERIOD_FIELDS

    XMLWordPrintable

Details

    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).

      Attachments

        Activity

          People

            nikitamalyavin Nikita Malyavin
            elenst Elena Stepanova
            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.