summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/partition_bug18198.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/partition_bug18198.test
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/partition_bug18198.test')
-rw-r--r--mysql-test/main/partition_bug18198.test219
1 files changed, 219 insertions, 0 deletions
diff --git a/mysql-test/main/partition_bug18198.test b/mysql-test/main/partition_bug18198.test
new file mode 100644
index 00000000..720d483e
--- /dev/null
+++ b/mysql-test/main/partition_bug18198.test
@@ -0,0 +1,219 @@
+-- source include/have_partition.inc
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+create table t1 (col1 datetime)
+partition by range(datediff(col1,col1))
+(partition p0 values less than (10), partition p1 values less than (30));
+drop table t1;
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(greatest(col1,10))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(isnull(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(least(col1,12))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(case when col1>0 then 10 else 20 end)
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(ifnull(col1,5))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(nullif(col1,5))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(bit_length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(bit_length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(char_length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(char_length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(character_length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(find_in_set(col1,1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(find_in_set(col1,'1'))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(instr(col1,3))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(instr(col1,'3'))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(locate(1,col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(locate(1,col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(octet_length(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(position(1 in col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(position(1 in col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 char(5))
+partition by range(strcmp(col1,2))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(strcmp(col1,2))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(crc32(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(round(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(sign(col1))
+(partition p0 values less than (2), partition p1 values less than (6));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 datetime)
+partition by range(period_add(col1,5))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 datetime, col2 datetime)
+partition by range(period_diff(col1,col2))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int, col2 int)
+partition by range(period_diff(col1,col2))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 datetime)
+partition by range(timestampdiff(day,5,col1))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
+create table t1 (col1 date)
+partition by range(unix_timestamp(col1))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 datetime)
+partition by range(week(col1))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 varchar(25))
+partition by range(cast(col1 as signed))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 varchar(25))
+partition by range(convert(col1,unsigned))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(col1 | 20)
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(col1 & 20)
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(col1 ^ 20)
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(col1 << 20)
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(col1 >> 20)
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(~col1)
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(bit_count(col1))
+(partition p0 values less than (10), partition p1 values less than (30));
+
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
+create table t1 (col1 int)
+partition by range(inet_aton(col1))
+(partition p0 values less than (10), partition p1 values less than (30));