summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_mgm.test
diff options
context:
space:
mode:
authormikael/pappa@dator5.(none) <>2006-08-08 08:52:51 -0400
committermikael/pappa@dator5.(none) <>2006-08-08 08:52:51 -0400
commit79ab9cef2715d433e905385c8cf20ee9694bf036 (patch)
tree85931e220bc8936b370fcc37cbaf2a1b5cae33b5 /mysql-test/t/partition_mgm.test
parenta4eb61b88cbe4e8f6e43db2ca841fa60ec73467c (diff)
downloadmariadb-git-79ab9cef2715d433e905385c8cf20ee9694bf036.tar.gz
BUG#21143: mysqld hangs when using wrong number of subpartitions
Rewrote if-statement a bit shorter Added check for subpartitions in REORGANIZE partitions to be of same number as in base table.
Diffstat (limited to 'mysql-test/t/partition_mgm.test')
-rw-r--r--mysql-test/t/partition_mgm.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/partition_mgm.test b/mysql-test/t/partition_mgm.test
index 39512de154f..f1a89b28443 100644
--- a/mysql-test/t/partition_mgm.test
+++ b/mysql-test/t/partition_mgm.test
@@ -2,6 +2,23 @@
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
+
+#
+# Bug 21143: mysqld hang when error in number of subparts in
+# REORGANIZE command
+#
+create table t1 (a int)
+partition by range (a)
+subpartition by key (a)
+(partition p0 values less than (10) (subpartition sp00, subpartition sp01),
+ partition p1 values less than (20) (subpartition sp10, subpartition sp11));
+
+-- error ER_PARTITION_WRONG_NO_SUBPART_ERROR
+alter table t1 reorganize partition p0 into
+(partition p0 values less than (10) (subpartition sp00,
+subpartition sp01, subpartition sp02));
+drop table t1;
+
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2;
SHOW CREATE TABLE t1;