summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_myisam.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-17 18:51:12 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-17 18:51:12 +0200
commitc1d6a2d7e194225ccc19a68ea5d0f368632620d0 (patch)
treebd13736fa139caac8c6e21484d2f03f6f0d30d57 /mysql-test/t/partition_myisam.test
parent1b82512914db8d5779395017e2ed4a66a48b561c (diff)
downloadmariadb-git-c1d6a2d7e194225ccc19a68ea5d0f368632620d0.tar.gz
merge few bug fixes from 5.6
Diffstat (limited to 'mysql-test/t/partition_myisam.test')
-rw-r--r--mysql-test/t/partition_myisam.test52
1 files changed, 49 insertions, 3 deletions
diff --git a/mysql-test/t/partition_myisam.test b/mysql-test/t/partition_myisam.test
index 0a4d14662a3..a33b9e19fbf 100644
--- a/mysql-test/t/partition_myisam.test
+++ b/mysql-test/t/partition_myisam.test
@@ -1,5 +1,4 @@
--- source include/have_partition.inc
-
+--source include/have_partition.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
@@ -10,6 +9,38 @@ DROP TABLE IF EXISTS t1, t2;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
+--echo #
+--echo # BUG#11933226 - 60681: CHECKSUM TABLE RETURNS 0 FOR PARTITIONED TABLE
+--echo #
+CREATE TABLE t1 (
+ i INT
+)
+ENGINE=MyISAM
+PARTITION BY RANGE (i)
+(PARTITION p3 VALUES LESS THAN (3),
+ PARTITION p5 VALUES LESS THAN (5),
+ PARTITION pMax VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6);
+CHECKSUM TABLE t1;
+ALTER TABLE t1 CHECKSUM = 1;
+CHECKSUM TABLE t1 EXTENDED;
+--echo # Before patch this returned 0!
+CHECKSUM TABLE t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo # Same test without partitioning
+CREATE TABLE t1 (
+ i INT
+) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6);
+CHECKSUM TABLE t1;
+ALTER TABLE t1 CHECKSUM = 1;
+CHECKSUM TABLE t1 EXTENDED;
+CHECKSUM TABLE t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
#
# Disabled by WL#946: binary format for timestamp column is not compatible.
@@ -40,6 +71,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
#INSERT INTO t1 VALUES ('2001-02-03 04:05:06');
#--sorted_result
#SELECT * FROM t1;
+#SELECT a, hex(weight_string(a)) FROM t1;
#ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
#--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
#ALTER TABLE t1
@@ -60,7 +92,6 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
#SELECT * FROM t1;
#DROP TABLE t1;
-
--echo #
--echo # Bug#31931: Mix of handlers error message
--echo #
@@ -184,3 +215,18 @@ PARTITION BY RANGE (a)
PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row");
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;