Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
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
- is duplicated by
-
MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys
- Closed