diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-21 14:05:44 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-21 14:05:44 +0100 |
commit | a52e2c787d90a6681a2f27bee2a675d12e67c7d2 (patch) | |
tree | dc24d568287969bbed9583be02652e8a69badb09 | |
parent | 3bb249612fe3864f152aa990d4d5f267ac9bb688 (diff) | |
download | mariadb-git-a52e2c787d90a6681a2f27bee2a675d12e67c7d2.tar.gz |
MDEV-5823 MySQL bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED TABLE CORRUPTS MYISAM
add the test case only
-rw-r--r-- | mysql-test/r/not_partition.result | 14 | ||||
-rw-r--r-- | mysql-test/r/partition_disabled.result | 15 | ||||
-rw-r--r-- | mysql-test/t/not_partition.test | 14 | ||||
-rw-r--r-- | mysql-test/t/partition_disabled.test | 17 |
4 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/r/not_partition.result b/mysql-test/r/not_partition.result index 8bff8708a86..3d6f3fe39a3 100644 --- a/mysql-test/r/not_partition.result +++ b/mysql-test/r/not_partition.result @@ -85,3 +85,17 @@ explain partitions select * from t1 where a='a ' OR a='a'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where drop table t1; +# +# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +# TABLE CORRUPTS MYISAM +DROP TABLE if exists `t1`; +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +ALTER TABLE `t1` REMOVE PARTITIONING; +CHECK TABLE `t1` EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/r/partition_disabled.result b/mysql-test/r/partition_disabled.result index edf3a56d9b2..c78552beb9d 100644 --- a/mysql-test/r/partition_disabled.result +++ b/mysql-test/r/partition_disabled.result @@ -91,3 +91,18 @@ explain partitions select * from t1 where a='a ' OR a='a'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where drop table t1; +# +# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +# TABLE CORRUPTS MYISAM +DROP TABLE if exists `t1`; +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +ALTER TABLE `t1` REMOVE PARTITIONING; +ERROR HY000: Partition management on a not partitioned table is not possible +CHECK TABLE `t1` EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/t/not_partition.test b/mysql-test/t/not_partition.test index a4faa794e3d..dd52e4b97e6 100644 --- a/mysql-test/t/not_partition.test +++ b/mysql-test/t/not_partition.test @@ -84,3 +84,17 @@ create table t1 (a varchar(10) charset latin1 collate latin1_bin); insert into t1 values (''),(' '),('a'),('a '),('a '); explain partitions select * from t1 where a='a ' OR a='a'; drop table t1; +--echo # +--echo # bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +--echo # TABLE CORRUPTS MYISAM +--disable_warnings +DROP TABLE if exists `t1`; +--enable_warnings +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +ALTER TABLE `t1` REMOVE PARTITIONING; +CHECK TABLE `t1` EXTENDED; +DROP TABLE t1; diff --git a/mysql-test/t/partition_disabled.test b/mysql-test/t/partition_disabled.test index c3e6cd5119f..940aea105ce 100644 --- a/mysql-test/t/partition_disabled.test +++ b/mysql-test/t/partition_disabled.test @@ -85,3 +85,20 @@ create table t1 (a varchar(10) charset latin1 collate latin1_bin); insert into t1 values (''),(' '),('a'),('a '),('a '); explain partitions select * from t1 where a='a ' OR a='a'; drop table t1; + +--echo # +--echo # bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED +--echo # TABLE CORRUPTS MYISAM +--disable_warnings +DROP TABLE if exists `t1`; +--enable_warnings +CREATE TABLE `t1`(`a` INT)ENGINE=myisam; +ALTER TABLE `t1` ADD COLUMN `b` INT; +CREATE UNIQUE INDEX `i1` ON `t1`(`b`); +CREATE UNIQUE INDEX `i2` ON `t1`(`a`); +ALTER TABLE `t1` ADD PRIMARY KEY (`a`); +--error ER_PARTITION_MGMT_ON_NONPARTITIONED +ALTER TABLE `t1` REMOVE PARTITIONING; +CHECK TABLE `t1` EXTENDED; +DROP TABLE t1; + |