1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-11114 Cannot drop column referenced by CHECK constraint

SQL Standard behavior for DROP COLUMN xxx RESTRICT:
* If a constraint (UNIQUE or CHECK) uses only the dropped column,
  it's automatically dropped too. If it uses many columns - an error.
This commit is contained in:
Sergei Golubchik
2017-08-12 18:52:38 +02:00
parent 28ddc9b3bb
commit 04b288ae47
17 changed files with 121 additions and 200 deletions

View File

@ -232,12 +232,6 @@ eval $my_select;
ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col);
eval $my_select;
#
# Check DROP COLUMN
eval $my_select;
ALTER TABLE db_datadict.t1_my_tablex
DROP COLUMN first_col;
eval $my_select;
#
# Check impact of DROP TABLE
SELECT table_name, column_name
FROM information_schema.key_column_usage