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

Bad error (message) upon violating WITHOUT OVERLAPS constraint

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5
    • 10.5
    • Versioned Tables
    • None

    Description

      create or replace table t1 (a int, s date, e date, period for p(s,e), primary key (a, p without overlaps));
      insert into t1 values (1,'2012-01-01','2020-01-01');
      insert into t1 values (1,'2016-06-06','2018-08-08');
      

      10.5 f544a712

      ERROR 1062 (23000): Duplicate entry '1-2018-08-08-2016-06-06' for key 'PRIMARY'
      

      There should be an error, as the value of a is the same and periods overlap. Whether it should be the ER_DUP_ENTRY is arguable. We discussed it and agreed to disagree, so apparently it will remain such.

      But the error message is undeniably wrong. There is no duplicate entry 1-2018-08-08-2016-06-06. This is going to be very confusing to whoever uses the feature. It needs to be changed to something more sensible.

      Attachments

        Activity

          People

            nikitamalyavin Nikita Malyavin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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