mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge
This commit is contained in:
@@ -47,6 +47,12 @@ partition by list column_list(a,b)
|
||||
( partition p0 values in ((1, NULL), (2, NULL), (NULL, NULL)),
|
||||
partition p1 values in ((1,1), (2,2)),
|
||||
partition p2 values in ((3, NULL), (NULL, 1)));
|
||||
select partition_method, partition_expression, partition_description
|
||||
from information_schema.partitions where table_name = "t1";
|
||||
partition_method partition_expression partition_description
|
||||
LIST COLUMN_LIST a,b (1,NULL),(2,NULL),(NULL,NULL)
|
||||
LIST COLUMN_LIST a,b (1,1),(2,2)
|
||||
LIST COLUMN_LIST a,b (3,NULL),(NULL,1)
|
||||
insert into t1 values (3, NULL);
|
||||
insert into t1 values (NULL, 1);
|
||||
insert into t1 values (NULL, NULL);
|
||||
@@ -91,6 +97,11 @@ create table t1 (a int)
|
||||
partition by list (a)
|
||||
( partition p0 values in (2, 1),
|
||||
partition p1 values in (4, NULL, 3));
|
||||
select partition_method, partition_expression, partition_description
|
||||
from information_schema.partitions where table_name = "t1";
|
||||
partition_method partition_expression partition_description
|
||||
LIST a 2,1
|
||||
LIST a NULL,4,3
|
||||
insert into t1 values (1);
|
||||
insert into t1 values (2);
|
||||
insert into t1 values (3);
|
||||
@@ -108,6 +119,11 @@ create table t1 (a int)
|
||||
partition by list column_list(a)
|
||||
( partition p0 values in (2, 1),
|
||||
partition p1 values in (4, NULL, 3));
|
||||
select partition_method, partition_expression, partition_description
|
||||
from information_schema.partitions where table_name = "t1";
|
||||
partition_method partition_expression partition_description
|
||||
LIST COLUMN_LIST a 2,1
|
||||
LIST COLUMN_LIST a 4,NULL,3
|
||||
insert into t1 values (1);
|
||||
insert into t1 values (2);
|
||||
insert into t1 values (3);
|
||||
@@ -132,6 +148,25 @@ subpartitions 4
|
||||
partition p1 values less than (1, 'a', MAXVALUE, TO_DAYS('1999-01-01')),
|
||||
partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE),
|
||||
partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE));
|
||||
select partition_method, partition_expression, partition_description
|
||||
from information_schema.partitions where table_name = "t1";
|
||||
partition_method partition_expression partition_description
|
||||
RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL
|
||||
RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL
|
||||
RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL
|
||||
RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
|
||||
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
|
||||
drop table t1;
|
||||
create table t1 (a int, b char(10), c varchar(5), d int)
|
||||
partition by range column_list(a,b,c)
|
||||
@@ -141,6 +176,21 @@ subpartitions 3
|
||||
partition p1 values less than (2,'abc','abc'),
|
||||
partition p2 values less than (3,'abc','abc'),
|
||||
partition p3 values less than (4,'abc','abc'));
|
||||
select partition_method, partition_expression, partition_description
|
||||
from information_schema.partitions where table_name = "t1";
|
||||
partition_method partition_expression partition_description
|
||||
RANGE COLUMN_LIST a,b,c 1,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 1,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 1,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 2,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 2,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 2,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 3,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 3,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 3,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 4,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 4,'abc','abc'
|
||||
RANGE COLUMN_LIST a,b,c 4,'abc','abc'
|
||||
insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3);
|
||||
insert into t1 values (1,'b','c',1),(2,'b','c',2),(3,'b','c',3);
|
||||
insert into t1 values (1,'c','d',1),(2,'c','d',2),(3,'c','d',3);
|
||||
@@ -155,6 +205,11 @@ create table t1 (a int, b varchar(2), c int)
|
||||
partition by range column_list (a, b, c)
|
||||
(partition p0 values less than (1, 'A', 1),
|
||||
partition p1 values less than (1, 'B', 1));
|
||||
select partition_method, partition_expression, partition_description
|
||||
from information_schema.partitions where table_name = "t1";
|
||||
partition_method partition_expression partition_description
|
||||
RANGE COLUMN_LIST a,b,c 1,'A',1
|
||||
RANGE COLUMN_LIST a,b,c 1,'B',1
|
||||
insert into t1 values (1, 'A', 1);
|
||||
explain partitions select * from t1 where a = 1 AND b <= 'A' and c = 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
|
||||
Reference in New Issue
Block a user