diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/partition.test | 2 | ||||
-rw-r--r-- | mysql-test/t/partition_error.test | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index d4e930f91ec..4583c06e74f 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -884,7 +884,7 @@ drop table t2; # Bug#14367: Partitions: crash if utf8 column # create table t1 (s1 char(2) character set utf8) -partition by list (case when s1 > 'cz' then 1 else 2 end) +partition by list (cast(s1 as signed)) (partition p1 values in (1), partition p2 values in (2)); drop table t1; diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index d0e3f355292..a9efbc587be 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -9,6 +9,28 @@ drop table if exists t1; --enable_warnings # +# Bug 18198: Partitions: Too flexible functions +# +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int) +partition by range (a) +(partition p0 values less than ((select count(*) from t1))); +-- error 1054 +create table t1 (a int) +partition by range (a) +(partition p0 values less than (a); + +create table t1 (a int) +partition by range (a) +(partition p0 values less than (1)); +-- error 1054 +alter table t1 add partition (partition p1 values less than (a)); +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +alter table t1 add partition +(partition p1 values less than ((select count(*) from t1))); +drop table t1; + +# # Bug 20397: Partitions: Crash when using non-existing engine # create table t1 (a int) |