summaryrefslogtreecommitdiff
path: root/mysql-test/t/not_partition.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/not_partition.test')
-rw-r--r--mysql-test/t/not_partition.test22
1 files changed, 18 insertions, 4 deletions
diff --git a/mysql-test/t/not_partition.test b/mysql-test/t/not_partition.test
index b930214e008..dd52e4b97e6 100644
--- a/mysql-test/t/not_partition.test
+++ b/mysql-test/t/not_partition.test
@@ -2,10 +2,10 @@
# Run this test only when mysqld doesn't have partitioning (not compiled with)
# the statements are not expected to work, just check that we
# can't crash the server
--- require r/not_partition.require
-disable_query_log;
-show variables like "have_partitioning";
-enable_query_log;
+if (`SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'partition'`)
+{
+ --skip Test requires no partitioning
+}
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
@@ -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;