diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-10-25 17:17:32 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-10-28 08:40:48 +0100 |
commit | c13519312bebc3104510d84157894b7477c09a78 (patch) | |
tree | c3c0ab1009bd9554bdb3fd88777a51187c7a616f /mysql-test/suite/vcol | |
parent | 8bb6b9c63445c733890749ee387aba1c5014cc1c (diff) | |
download | mariadb-git-c13519312bebc3104510d84157894b7477c09a78.tar.gz |
MDEV-20799 DROP Virtual Column crashes MariaDB
use the correct table for evaluating virtual columns in the
InnoDB ALTER TABLE.
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r-- | mysql-test/suite/vcol/r/vcol_keys_innodb.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_keys_innodb.opt | 1 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/vcol_keys_innodb.test | 18 |
3 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result index c6c05429978..c327b369ea3 100644 --- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result @@ -269,3 +269,18 @@ index(col_char,vcol_blob(64)) insert ignore into t1 (pk) values (1),(2); update t1 set col_char = 'foo' where pk = 1; drop table t1; +create table t1 ( +id int not null primary key, +a varchar(200), +b varchar(200), +c int, +va char(200) generated always as (ucase(a)) virtual, +vb char(200) generated always as (ucase(b)) virtual, +key (c,va,vb) +) engine=innodb; +insert t1 (id,a,c) select seq,seq,seq from seq_1_to_330; +select IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') from t1; +IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') +GOOD +alter table t1 drop column va; +drop table t1; diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.opt b/mysql-test/suite/vcol/t/vcol_keys_innodb.opt new file mode 100644 index 00000000000..778b4443d4f --- /dev/null +++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.opt @@ -0,0 +1 @@ +--innodb-sort-buffer-size=64k diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test index 58fb8378ac7..c475dd71a69 100644 --- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test +++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test @@ -117,3 +117,21 @@ create table t1 ( insert ignore into t1 (pk) values (1),(2); update t1 set col_char = 'foo' where pk = 1; drop table t1; + +# +# MDEV-20799 DROP Virtual Column crashes MariaDB +# +--source include/have_sequence.inc +create table t1 ( + id int not null primary key, + a varchar(200), + b varchar(200), + c int, + va char(200) generated always as (ucase(a)) virtual, + vb char(200) generated always as (ucase(b)) virtual, + key (c,va,vb) +) engine=innodb; +insert t1 (id,a,c) select seq,seq,seq from seq_1_to_330; +select IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') from t1; +alter table t1 drop column va; +drop table t1; |