1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

BUG#18198: Too flexible partition functions

mysql-test/r/partition_error.result:
  New test cases
mysql-test/t/partition_error.test:
  New test cases
sql/sql_yacc.yy:
  Verify that partition function is allowed before "fixing" it
This commit is contained in:
unknown
2006-06-20 10:57:02 -04:00
parent 9f8c532f0c
commit 3856cdb89b
3 changed files with 48 additions and 2 deletions

View File

@@ -8,6 +8,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
#