1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -162,7 +162,7 @@ SELECT table_name FROM information_schema.table_constraints
WHERE table_name LIKE 't1_my_table%';
table_name
CREATE TABLE test.t1_my_table
(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2))
(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1))
DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
ENGINE = <engine_type>;
SELECT constraint_name, table_schema, table_name, constraint_type