summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_error.test
diff options
context:
space:
mode:
authormikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se <>2006-05-31 13:32:14 -0400
committermikael@c-3d08e253.1238-1-64736c10.cust.bredbandsbolaget.se <>2006-05-31 13:32:14 -0400
commitfbd7a258e242b13f98e1c12931597b1f87025d4d (patch)
tree39ade1255f49b17f2254392e7ecc88ecfba1018c /mysql-test/t/partition_error.test
parentd1b37d9c492d75f9db02d338a3ea232048cff986 (diff)
downloadmariadb-git-fbd7a258e242b13f98e1c12931597b1f87025d4d.tar.gz
BUG#18198: Many strange partition functions were allowed, now only strictly allowed functions are ok
Diffstat (limited to 'mysql-test/t/partition_error.test')
-rw-r--r--mysql-test/t/partition_error.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 03a2ab41807..659f0b8cef4 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -747,3 +747,31 @@ CREATE TABLE t1(a int)
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
insert into t1 values (10);
drop table t1;
+
+#
+# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
+#
+create table t1 (v varchar(12))
+partition by range (ascii(v))
+(partition p0 values less than (10));
+drop table t1;
+
+-- error 1064
+create table t1 (a int)
+partition by hash (rand(a));
+-- error 1064
+create table t1 (a int)
+partition by hash(CURTIME() + a);
+-- error 1064
+create table t1 (a int)
+partition by hash (NOW()+a);
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int)
+partition by hash (extract(hour from convert_tz(a, '+00:00', '+00:00')));
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (a int)
+partition by range (a + (select count(*) from t1))
+(partition p1 values less than (1));
+-- error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR
+create table t1 (a char(10))
+partition by hash (extractvalue(a,'a'));