Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.1.12
-
None
-
Windows 7 Professional
Description
Create a table 'newtable' with a varchar column 'myfield'.
Add a unique constraint:
ALTER TABLE newtable ADD CONSTRAINT UNIQUE bla (myfield);
Drop the constraint again
ALTER TABLE newtable DROP CONSTRAINT bla RESTRICT;
You get an error 'You have an error in your SQL syntax'.
According to the knowledge base, this should work (it's basically copy-pasted):
https://mariadb.com/kb/en/sql-99/alter-table-statement/#drop-constraint-clause
Workaround: use DROP INDEX instread of DROP CONSTRAINT
ALTER IGNORE TABLE newtable DROP INDEX bla;
Attachments
Issue Links
- relates to
-
MDEV-14873 ALTER TABLE DROP CONSTRAINT does not work for unique constraints
- Closed