summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_error.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/partition_error.test')
-rw-r--r--mysql-test/t/partition_error.test22
1 files changed, 22 insertions, 0 deletions
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)