diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-08-12 18:52:38 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-08-14 19:45:59 +0200 |
commit | 04b288ae47dec8bd1a41902889956c4b0d711cc5 (patch) | |
tree | 20f850d7109609320dedab2484040ab59b88e1a8 /mysql-test/suite/gcol/t/innodb_virtual_basic.test | |
parent | 28ddc9b3bbbb56a3146779b1f0ccf42a6ef50f2b (diff) | |
download | mariadb-git-04b288ae47dec8bd1a41902889956c4b0d711cc5.tar.gz |
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.
Diffstat (limited to 'mysql-test/suite/gcol/t/innodb_virtual_basic.test')
-rw-r--r-- | mysql-test/suite/gcol/t/innodb_virtual_basic.test | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_basic.test b/mysql-test/suite/gcol/t/innodb_virtual_basic.test index 4f88fb7f8f6..c2f2e47cfcf 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_basic.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_basic.test @@ -780,48 +780,6 @@ alter table t add c INT GENERATED ALWAYS AS(a/b); create index idx on t(c); DROP TABLE t; -CREATE TABLE t ( - pk INTEGER AUTO_INCREMENT, - col_int_nokey INTEGER /*! NULL */, - col_int INT GENERATED ALWAYS AS (col_int_nokey + col_int_nokey) STORED, - col_int_key INTEGER GENERATED ALWAYS AS (col_int + col_int_nokey) VIRTUAL, - col_date_nokey DATE /*! NULL */, - col_date DATE GENERATED ALWAYS AS (DATE_ADD(col_date_nokey,interval 30 day)) STORED, - col_date_key DATE GENERATED ALWAYS AS (DATE_ADD(col_date,interval 30 day)) VIRTUAL, - col_datetime_nokey DATETIME /*! NULL */, - col_time_nokey TIME /*! NULL */, - col_datetime DATETIME GENERATED ALWAYS AS (ADDTIME(col_datetime_nokey, col_time_nokey)) STORED, - col_time TIME GENERATED ALWAYS AS (ADDTIME(col_datetime_nokey, col_time_nokey)) STORED, - col_datetime_key DATETIME GENERATED ALWAYS AS (ADDTIME(col_datetime, col_time_nokey)) VIRTUAL, - col_time_key TIME GENERATED ALWAYS AS (ADDTIME(col_datetime_nokey, col_time)) VIRTUAL, - col_varchar_nokey VARCHAR(1) /*! NULL */, - col_varchar VARCHAR(2) GENERATED ALWAYS AS (CONCAT(col_varchar_nokey,col_varchar_nokey)) STORED, - col_varchar_key VARCHAR(2) GENERATED ALWAYS AS (CONCAT(col_varchar, 'x')) VIRTUAL, - unique KEY (pk,col_int_key), - KEY(col_int), - KEY(col_date), - KEY(col_datetime), - KEY(col_time), - KEY(col_varchar), - UNIQUE KEY (col_int_key), - KEY (col_time_key), - KEY (col_datetime_key), - UNIQUE KEY (col_int_key, col_varchar_key), - KEY (col_int_key, col_int_nokey), - KEY(col_int_key,col_date_key), - KEY(col_int_key, col_time_key), - KEY(col_int_key, col_datetime_key), - KEY(col_date_key,col_time_key,col_datetime_key), - KEY (col_varchar_key, col_varchar_nokey), - UNIQUE KEY (col_int_key, col_varchar_key, col_date_key, col_time_key, col_datetime_key) -) AUTO_INCREMENT=10 ENGINE=INNODB PARTITION BY KEY(col_int_key) PARTITIONS 3; - -ALTER TABLE t DROP COLUMN `pk`; - -SHOW CREATE TABLE t; - -DROP TABLE t; - CREATE TABLE t (a INT, b INT, c INT GENERATED ALWAYS AS(a+b), h VARCHAR(10)); INSERT INTO t VALUES (11, 3, DEFAULT, 'mm'); |