mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
BUG#18198: Partition function handling
Review fixes mysql-test/r/partition_range.result: New test cases mysql-test/t/partition_hash.test: New test cases mysql-test/t/partition_range.test: New test cases sql/item.h: Review fixes sql/partition_info.cc: Review fixes sql/sql_partition.cc: Review fixes
This commit is contained in:
@@ -9,6 +9,49 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# BUG 18198: Various tests for partition functions
|
||||
#
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)
|
||||
partition by range (length(a) * b)
|
||||
(partition p0 values less than (2), partition p1 values less than (10));
|
||||
insert into t1 values ('a ', 2),('a',3);
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int)
|
||||
partition by range (b* length(a) * b)
|
||||
(partition p0 values less than (2), partition p1 values less than (10));
|
||||
insert into t1 values ('a ', 2),('a',3);
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin,
|
||||
b varchar(10) charset latin1 collate latin1_bin)
|
||||
partition by range (length(b) * length(a))
|
||||
(partition p0 values less than (2), partition p1 values less than (10));
|
||||
insert into t1 values ('a ', 'b '),('a','b');
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin,
|
||||
b varchar(10) charset latin1 collate latin1_bin)
|
||||
partition by range (length(a) * length(b))
|
||||
(partition p0 values less than (2), partition p1 values less than (10));
|
||||
insert into t1 values ('a ', 'b '),('a','b');
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin,
|
||||
b varchar(10) charset latin1 collate latin1_bin, c int)
|
||||
partition by range (length(a) * c)
|
||||
(partition p0 values less than (2), partition p1 values less than (10));
|
||||
insert into t1 values ('a ', 'b ', 2),('a','b', 3);
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a varchar(10) charset latin1 collate latin1_bin,
|
||||
b varchar(10) charset latin1 collate latin1_bin, c int)
|
||||
partition by range (c * length(a))
|
||||
(partition p0 values less than (2), partition p1 values less than (10));
|
||||
insert into t1 values ('a ', 'b ', 2),('a','b', 3);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# More checks for partition pruning
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user