diff options
Diffstat (limited to 'mysql-test/suite/parts/t/alter_table.test')
-rw-r--r-- | mysql-test/suite/parts/t/alter_table.test | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/suite/parts/t/alter_table.test b/mysql-test/suite/parts/t/alter_table.test new file mode 100644 index 00000000..53b61806 --- /dev/null +++ b/mysql-test/suite/parts/t/alter_table.test @@ -0,0 +1,40 @@ +# +# General errors with ALTER TABLE and partitions that doesn't have to be run +# on all engines +# + +--source include/have_partition.inc + +# +# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER +# + +set @save_alter_algorithm= @@session.alter_algorithm; +SET SESSION alter_algorithm=4; +CREATE TABLE t1(a INT) engine=myisam PARTITION BY RANGE(a) SUBPARTITION BY KEY(a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION s0,SUBPARTITION s1), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION s2,SUBPARTITION s3)); +show create table t1; +--error ER_ALTER_OPERATION_NOT_SUPPORTED +ALTER TABLE t1 ADD COLUMN c INT; +DROP table if exists t1; +set @@session.alter_algorithm= @save_alter_algorithm; + + +# +# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata | +# ERROR 1507 (HY000): Error in list of partitions to DROP +# + +CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3)); +ALTER TABLE t1 DROP PARTITION p; +DROP TABLE if exists t1; + +# +# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition +# +CREATE TABLE t1 (i INT); +CREATE VIEW v1 as SELECT * FROM t1; +CREATE TABLE t2 (i INT); +--error ER_CHECK_NO_SUCH_TABLE +ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ; +DROP VIEW v1; +DROP TABLE t1, t2; |