summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/partition.test')
-rw-r--r--mysql-test/t/partition.test65
1 files changed, 65 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 6c1e17e7cf3..23d6c5f8865 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -1543,6 +1543,24 @@ while ($cnt)
drop table t1;
#
+# BUG#32272: partition crash 1: enum column
+#
+create table t1 (
+ c0 int,
+ c1 bigint,
+ c2 set('sweet'),
+ key (c2,c1,c0),
+ key(c0)
+) engine=myisam partition by hash (month(c0)) partitions 5;
+
+--disable_warnings
+insert ignore into t1 set c0 = -6502262, c1 = 3992917, c2 = 35019;
+insert ignore into t1 set c0 = 241221, c1 = -6862346, c2 = 56644;
+--enable_warnings
+# This must not fail assert:
+select c1 from t1 group by (select c0 from t1 limit 1);
+drop table t1;
+
# Bug #30495: optimize table t1,t2,t3 extended errors
#
CREATE TABLE t1(a int)
@@ -1594,4 +1612,51 @@ CREATE TABLE t1 (s1 BIGINT UNSIGNED)
);
DROP TABLE t1;
+#
+# Bug #31890 Partitions: ORDER BY DESC in InnoDB not working
+#
+
+CREATE TABLE t1
+(int_column INT, char_column CHAR(5),
+PRIMARY KEY(char_column,int_column))
+PARTITION BY KEY(char_column,int_column)
+PARTITIONS 101;
+INSERT INTO t1 (int_column, char_column) VALUES
+( 39868 ,'zZZRW'),
+( 545592 ,'zZzSD'),
+( 4936 ,'zzzsT'),
+( 9274 ,'ZzZSX'),
+( 970185 ,'ZZzTN'),
+( 786036 ,'zZzTO'),
+( 37240 ,'zZzTv'),
+( 313801 ,'zzzUM'),
+( 782427 ,'ZZZva'),
+( 907955 ,'zZZvP'),
+( 453491 ,'zzZWV'),
+( 756594 ,'ZZZXU'),
+( 718061 ,'ZZzZH');
+SELECT * FROM t1 ORDER BY char_column DESC;
+DROP TABLE t1;
+
+#
+# Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table)
+#
+
+CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ user CHAR(25), PRIMARY KEY(id))
+ PARTITION BY RANGE(id)
+ SUBPARTITION BY hash(id) subpartitions 2
+ (PARTITION pa1 values less than (10),
+ PARTITION pa2 values less than (20),
+ PARTITION pa11 values less than MAXVALUE);
+--disable_query_log
+let $n= 15;
+while ($n)
+{
+ insert into t1 (user) values ('mysql');
+ dec $n;
+}
+--enable_query_log
+show create table t1;
+drop table t1;
--echo End of 5.1 tests