mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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:
@@ -79,14 +79,6 @@ insert into t1(c1) values(1);
|
||||
insert into t1(c1) values(2);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-11114 Cannot drop column referenced by CHECK constraint: Unknown column 'a' in 'virtual column function'
|
||||
#
|
||||
create table t1 (a int, b int, check(a>0));
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
alter table t1 drop column a;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-11117 CHECK constraint fails on intermediate step of ALTER
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user