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

DROP CONSTRAINT implementation is incomplete

    XMLWordPrintable

    Details

      Description

      In ALTER TABLE, the ADD CONSTRAINT clause can be used to add unique indexes, foreign keys and checks, associating a constraint name to those objects. DROP CONSTRAINT can only drop checks.

      If I try to drop a constraint which is a unique index or a foreign key, the error message suggests that it may not exist, and doesn't suggest that I may need to use a different syntax to drop that constraint:

      ERROR 1091 (42000): Can't DROP CONSTRAINT `unq_title`; check that it exists
      

      While historical users may know that DROP CONSTRAINT syntax didn't exist in the past and has been implemented for checks, for new users this is confusing and will surely look like a bug.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              f_razzoli Federico Razzoli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: