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.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index a7f2e1c0b3e..f893d6e704c 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -10,6 +10,34 @@ drop table if exists t1;
--enable_warnings
#
+# BUG 16002: Handle unsigned integer functions properly
+#
+--error 1064
+create table t1 (a bigint)
+partition by range (a)
+(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
+ partition p1 values less than (10));
+--error 1064
+create table t1 (a bigint)
+partition by list (a)
+(partition p0 values in (0xFFFFFFFFFFFFFFFF),
+ partition p1 values in (10));
+
+create table t1 (a bigint unsigned)
+partition by range (a)
+(partition p0 values less than (100),
+ partition p1 values less than MAXVALUE);
+insert into t1 values (1);
+drop table t1;
+
+create table t1 (a bigint unsigned)
+partition by hash (a);
+insert into t1 values (0xFFFFFFFFFFFFFFFD);
+insert into t1 values (0xFFFFFFFFFFFFFFFE);
+select * from t1 where (a + 1) < 10;
+select * from t1 where (a + 1) > 10;
+
+#
# Bug 19307: CSV engine crashes
#
--error ER_PARTITION_MERGE_ERROR
@@ -19,6 +47,7 @@ partition by list (a)
(partition p0 values in (null));
#
+# Added test case
#
create table t1 (a int)
partition by key(a)
@@ -986,6 +1015,23 @@ SHOW TABLE STATUS;
DROP TABLE t1;
#
+#BUG 16002 Erroneus handling of unsigned partition functions
+#
+--error ER_PARTITION_CONST_DOMAIN_ERROR
+create table t1 (a bigint unsigned)
+partition by list (a)
+(partition p0 values in (0-1));
+
+create table t1 (a bigint unsigned)
+partition by range (a)
+(partition p0 values less than (10));
+
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+insert into t1 values (0xFFFFFFFFFFFFFFFF);
+
+drop table t1;
+
+#
#BUG 18750 Problems with partition names
#
create table t1 (a int)