summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_range.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/partition_range.test')
-rw-r--r--mysql-test/t/partition_range.test45
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test
index 6ed3abab46a..bc4231d1d71 100644
--- a/mysql-test/t/partition_range.test
+++ b/mysql-test/t/partition_range.test
@@ -10,6 +10,51 @@ drop table if exists t1, t2;
--enable_warnings
#
+# BUG 33429: Succeeds in adding partition when maxvalue on last partition
+#
+create table t1 (a int)
+partition by range (a)
+( partition p0 values less than (maxvalue));
+--error ER_PARTITION_MAXVALUE_ERROR
+alter table t1 add partition (partition p1 values less than (100000));
+show create table t1;
+drop table t1;
+
+# BUG 32943:
+# Locking problems in relation to partitioning and triggers
+# Also fixes and test cases of generic lock issues with
+# partition change code.
+#
+create table t1 (a integer)
+partition by range (a)
+( partition p0 values less than (4),
+ partition p1 values less than (100));
+
+delimiter |;
+create trigger tr1 before insert on t1
+for each row begin
+ set @a = 1;
+end|
+
+delimiter ;|
+alter table t1 drop partition p0;
+
+drop table t1;
+
+create table t1 (a integer)
+partition by range (a)
+( partition p0 values less than (4),
+ partition p1 values less than (100));
+LOCK TABLES t1 WRITE;
+alter table t1 drop partition p0;
+alter table t1 reorganize partition p1 into
+( partition p0 values less than (4),
+ partition p1 values less than (100));
+alter table t1 add partition ( partition p2 values less than (200));
+UNLOCK TABLES;
+drop table t1;
+
+#
# BUG 18198: Various tests for partition functions
#
#create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)