summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_column.test
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-10-30 21:44:41 +0100
committerMikael Ronstrom <mikael@mysql.com>2009-10-30 21:44:41 +0100
commitcf8fddb910631403a0814a1b8ea5283322b0cde5 (patch)
tree80a9252eea4875a6877c96f45603b7890a1d7070 /mysql-test/t/partition_column.test
parent319e84350997538cf842bc04e58cf9c939491b1b (diff)
downloadmariadb-git-cf8fddb910631403a0814a1b8ea5283322b0cde5.tar.gz
Fixed such that we fail if using integer constants for character set fields, now need to have correct constant types
Diffstat (limited to 'mysql-test/t/partition_column.test')
-rw-r--r--mysql-test/t/partition_column.test12
1 files changed, 11 insertions, 1 deletions
diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test
index 3d18fcdd337..564943543a7 100644
--- a/mysql-test/t/partition_column.test
+++ b/mysql-test/t/partition_column.test
@@ -51,6 +51,7 @@ insert into t1 values ('');
insert into t1 values (_ucs2 0x2020);
drop table t1;
+--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
create table t1 (a int, b char(10), c varchar(25), d datetime)
partition by range columns(a,b,c,d)
subpartition by hash (to_seconds(d))
@@ -59,6 +60,15 @@ subpartitions 4
partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'),
partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE),
partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE));
+
+create table t1 (a int, b char(10), c varchar(25), d datetime)
+partition by range columns(a,b,c,d)
+subpartition by hash (to_seconds(d))
+subpartitions 4
+( partition p0 values less than (1, '0', MAXVALUE, '1900-01-01'),
+ partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'),
+ partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE),
+ partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
show create table t1;
@@ -310,7 +320,7 @@ partition by range columns(a)
(partition p0 values less than (H23456),
partition p1 values less than (M23456));
--- error ER_RANGE_NOT_INCREASING_ERROR
+-- error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
create table t1 (a char(6))
partition by range columns(a)
(partition p0 values less than (23456),