Commit caa4fffa authored by Mikael Ronstrom's avatar Mikael Ronstrom

Changed COLUMN_LIST to COLUMNS after arch review

parent 53dc58d8
drop table if exists t1; drop table if exists t1;
create table t1 (a varchar(1500), b varchar(1570)) create table t1 (a varchar(1500), b varchar(1570))
partition by list column_list(a,b) partition by list columns(a,b)
( partition p0 values in (('a','b'))); ( partition p0 values in (('a','b')));
ERROR HY000: The total length of the partitioning fields is too large ERROR HY000: The total length of the partitioning fields is too large
create table t1 (a varchar(1023) character set utf8 collate utf8_spanish2_ci) create table t1 (a varchar(1023) character set utf8 collate utf8_spanish2_ci)
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('CZ'), ( partition p0 values less than ('CZ'),
partition p1 values less than ('CH'), partition p1 values less than ('CH'),
partition p2 values less than ('D')); partition p2 values less than ('D'));
...@@ -16,16 +16,16 @@ cg ...@@ -16,16 +16,16 @@ cg
drop table t1; drop table t1;
set @@sql_mode=allow_invalid_dates; set @@sql_mode=allow_invalid_dates;
create table t1 (a char, b char, c date) create table t1 (a char, b char, c date)
partition by range column_list (a,b,c) partition by range columns (a,b,c)
( partition p0 values less than (0,0,to_days('3000-11-31'))); ( partition p0 values less than (0,0,to_days('3000-11-31')));
ERROR HY000: Partition column values of incorrect type ERROR HY000: Partition column values of incorrect type
create table t1 (a char, b char, c date) create table t1 (a char, b char, c date)
partition by range column_list (a,b,c) partition by range columns (a,b,c)
( partition p0 values less than (0,0,'3000-11-31')); ( partition p0 values less than (0,0,'3000-11-31'));
ERROR HY000: Partition column values of incorrect type ERROR HY000: Partition column values of incorrect type
set @@sql_mode=''; set @@sql_mode='';
create table t1 (a varchar(2) character set ucs2) create table t1 (a varchar(2) character set ucs2)
partition by list column_list (a) partition by list columns (a)
(partition p0 values in (0x2020), (partition p0 values in (0x2020),
partition p1 values in ('')); partition p1 values in (''));
show create table t1; show create table t1;
...@@ -33,14 +33,14 @@ Table Create Table ...@@ -33,14 +33,14 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` varchar(2) CHARACTER SET ucs2 DEFAULT NULL `a` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST COLUMN_LIST(a) /*!50100 PARTITION BY LIST COLUMNS(a)
(PARTITION p0 VALUES IN (_ucs2' ') ENGINE = MyISAM, (PARTITION p0 VALUES IN (_ucs2' ') ENGINE = MyISAM,
PARTITION p1 VALUES IN (_ucs2'') ENGINE = MyISAM) */ PARTITION p1 VALUES IN (_ucs2'') ENGINE = MyISAM) */
insert into t1 values (''); insert into t1 values ('');
insert into t1 values (_ucs2 0x2020); insert into t1 values (_ucs2 0x2020);
drop table t1; drop table t1;
create table t1 (a int, b char(10), c varchar(25), d datetime) create table t1 (a int, b char(10), c varchar(25), d datetime)
partition by range column_list(a,b,c,d) partition by range columns(a,b,c,d)
subpartition by hash (to_seconds(d)) subpartition by hash (to_seconds(d))
subpartitions 4 subpartitions 4
( partition p0 values less than (1, 0, MAXVALUE, '1900-01-01'), ( partition p0 values less than (1, 0, MAXVALUE, '1900-01-01'),
...@@ -50,22 +50,22 @@ partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE)); ...@@ -50,22 +50,22 @@ partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1"; from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description partition_method partition_expression partition_description
RANGE COLUMN_LIST a,b,c,d 1,'0',MAXVALUE,'1900-01-01' RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'0',MAXVALUE,'1900-01-01' RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'0',MAXVALUE,'1900-01-01' RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'0',MAXVALUE,'1900-01-01' RANGE COLUMNS a,b,c,d 1,'0',MAXVALUE,'1900-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,'1999-01-01' RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,'1999-01-01' RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,'1999-01-01' RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,'1999-01-01' RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
RANGE COLUMN_LIST a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -74,7 +74,7 @@ t1 CREATE TABLE `t1` ( ...@@ -74,7 +74,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(25) DEFAULT NULL, `c` varchar(25) DEFAULT NULL,
`d` datetime DEFAULT NULL `d` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE COLUMN_LIST(a,b,c,d) /*!50100 PARTITION BY RANGE COLUMNS(a,b,c,d)
SUBPARTITION BY HASH (to_seconds(d)) SUBPARTITION BY HASH (to_seconds(d))
SUBPARTITIONS 4 SUBPARTITIONS 4
(PARTITION p0 VALUES LESS THAN (1,_latin1'0',MAXVALUE,'1900-01-01') ENGINE = MyISAM, (PARTITION p0 VALUES LESS THAN (1,_latin1'0',MAXVALUE,'1900-01-01') ENGINE = MyISAM,
...@@ -83,15 +83,15 @@ SUBPARTITIONS 4 ...@@ -83,15 +83,15 @@ SUBPARTITIONS 4
PARTITION p3 VALUES LESS THAN (1,MAXVALUE,MAXVALUE,MAXVALUE) ENGINE = MyISAM) */ PARTITION p3 VALUES LESS THAN (1,MAXVALUE,MAXVALUE,MAXVALUE) ENGINE = MyISAM) */
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list (a,b) partition by range columns (a,b)
(partition p0 values less than (NULL, maxvalue)); (partition p0 values less than (NULL, maxvalue));
ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
( partition p0 values in ((maxvalue, 0))); ( partition p0 values in ((maxvalue, 0)));
Got one of the listed errors Got one of the listed errors
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list (a,b) partition by list columns (a,b)
( partition p0 values in ((0,0))); ( partition p0 values in ((0,0)));
alter table t1 add partition alter table t1 add partition
(partition p1 values in (maxvalue, maxvalue)); (partition p1 values in (maxvalue, maxvalue));
...@@ -101,7 +101,7 @@ create table t1 (a int, b int) ...@@ -101,7 +101,7 @@ create table t1 (a int, b int)
partition by key (a,a); partition by key (a,a);
ERROR HY000: Duplicate partition field name 'a' ERROR HY000: Duplicate partition field name 'a'
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,a) partition by list columns(a,a)
( partition p values in ((1,1))); ( partition p values in ((1,1)));
ERROR HY000: Duplicate partition field name 'a' ERROR HY000: Duplicate partition field name 'a'
create table t1 (a int signed) create table t1 (a int signed)
...@@ -123,7 +123,7 @@ a ...@@ -123,7 +123,7 @@ a
0 0
drop table t1; drop table t1;
create table t1 (a int signed) create table t1 (a int signed)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in (1, 3, 5, 7, 9, NULL), ( partition p0 values in (1, 3, 5, 7, 9, NULL),
partition p1 values in (2, 4, 6, 8, 0)); partition p1 values in (2, 4, 6, 8, 0));
insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8); insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8);
...@@ -141,23 +141,23 @@ a ...@@ -141,23 +141,23 @@ a
0 0
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
( partition p0 values in ((1, NULL), (2, NULL), (NULL, NULL)), ( partition p0 values in ((1, NULL), (2, NULL), (NULL, NULL)),
partition p1 values in ((1,1), (2,2)), partition p1 values in ((1,1), (2,2)),
partition p2 values in ((3, NULL), (NULL, 1))); partition p2 values in ((3, NULL), (NULL, 1)));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1"; from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description partition_method partition_expression partition_description
LIST COLUMN_LIST a,b (1,NULL),(2,NULL),(NULL,NULL) LIST COLUMNS a,b (1,NULL),(2,NULL),(NULL,NULL)
LIST COLUMN_LIST a,b (1,1),(2,2) LIST COLUMNS a,b (1,1),(2,2)
LIST COLUMN_LIST a,b (3,NULL),(NULL,1) LIST COLUMNS a,b (3,NULL),(NULL,1)
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST COLUMN_LIST(a,b) /*!50100 PARTITION BY LIST COLUMNS(a,b)
(PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM, (PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM,
PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM, PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM,
PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */ PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */
...@@ -191,7 +191,7 @@ t1 CREATE TABLE `t1` ( ...@@ -191,7 +191,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL `b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST COLUMN_LIST(a,b) /*!50100 PARTITION BY LIST COLUMNS(a,b)
(PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM, (PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM,
PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM, PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM,
PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */ PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */
...@@ -227,25 +227,25 @@ insert into t1 values (5); ...@@ -227,25 +227,25 @@ insert into t1 values (5);
ERROR HY000: Table has no partition for value 5 ERROR HY000: Table has no partition for value 5
drop table t1; drop table t1;
create table t1 (a int) create table t1 (a int)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in (2, 1), ( partition p0 values in (2, 1),
partition p1 values in ((4), (NULL), (3))); partition p1 values in ((4), (NULL), (3)));
ERROR 42000: Row expressions in VALUES IN only allowed for multi-field column partitioning near '))' at line 4 ERROR 42000: Row expressions in VALUES IN only allowed for multi-field column partitioning near '))' at line 4
create table t1 (a int) create table t1 (a int)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in (2, 1), ( partition p0 values in (2, 1),
partition p1 values in (4, NULL, 3)); partition p1 values in (4, NULL, 3));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1"; from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description partition_method partition_expression partition_description
LIST COLUMN_LIST a 2,1 LIST COLUMNS a 2,1
LIST COLUMN_LIST a 4,NULL,3 LIST COLUMNS a 4,NULL,3
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST COLUMN_LIST(a) /*!50100 PARTITION BY LIST COLUMNS(a)
(PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM, (PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM,
PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */ PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */
insert into t1 values (1); insert into t1 values (1);
...@@ -260,12 +260,12 @@ Table Create Table ...@@ -260,12 +260,12 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST COLUMN_LIST(a) /*!50100 PARTITION BY LIST COLUMNS(a)
(PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM, (PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM,
PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */ PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */
drop table t1; drop table t1;
create table t1 (a int, b char(10), c varchar(5), d int) create table t1 (a int, b char(10), c varchar(5), d int)
partition by range column_list(a,b,c) partition by range columns(a,b,c)
subpartition by key (c,d) subpartition by key (c,d)
subpartitions 3 subpartitions 3
( partition p0 values less than (1,'abc','abc'), ( partition p0 values less than (1,'abc','abc'),
...@@ -275,18 +275,18 @@ partition p3 values less than (4,'abc','abc')); ...@@ -275,18 +275,18 @@ partition p3 values less than (4,'abc','abc'));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1"; from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description partition_method partition_expression partition_description
RANGE COLUMN_LIST a,b,c 1,'abc','abc' RANGE COLUMNS a,b,c 1,'abc','abc'
RANGE COLUMN_LIST a,b,c 1,'abc','abc' RANGE COLUMNS a,b,c 1,'abc','abc'
RANGE COLUMN_LIST a,b,c 1,'abc','abc' RANGE COLUMNS a,b,c 1,'abc','abc'
RANGE COLUMN_LIST a,b,c 2,'abc','abc' RANGE COLUMNS a,b,c 2,'abc','abc'
RANGE COLUMN_LIST a,b,c 2,'abc','abc' RANGE COLUMNS a,b,c 2,'abc','abc'
RANGE COLUMN_LIST a,b,c 2,'abc','abc' RANGE COLUMNS a,b,c 2,'abc','abc'
RANGE COLUMN_LIST a,b,c 3,'abc','abc' RANGE COLUMNS a,b,c 3,'abc','abc'
RANGE COLUMN_LIST a,b,c 3,'abc','abc' RANGE COLUMNS a,b,c 3,'abc','abc'
RANGE COLUMN_LIST a,b,c 3,'abc','abc' RANGE COLUMNS a,b,c 3,'abc','abc'
RANGE COLUMN_LIST a,b,c 4,'abc','abc' RANGE COLUMNS a,b,c 4,'abc','abc'
RANGE COLUMN_LIST a,b,c 4,'abc','abc' RANGE COLUMNS a,b,c 4,'abc','abc'
RANGE COLUMN_LIST a,b,c 4,'abc','abc' RANGE COLUMNS a,b,c 4,'abc','abc'
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -295,7 +295,7 @@ t1 CREATE TABLE `t1` ( ...@@ -295,7 +295,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(5) DEFAULT NULL, `c` varchar(5) DEFAULT NULL,
`d` int(11) DEFAULT NULL `d` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE COLUMN_LIST(a,b,c) /*!50100 PARTITION BY RANGE COLUMNS(a,b,c)
SUBPARTITION BY KEY (c,d) SUBPARTITION BY KEY (c,d)
SUBPARTITIONS 3 SUBPARTITIONS 3
(PARTITION p0 VALUES LESS THAN (1,_latin1'abc',_latin1'abc') ENGINE = MyISAM, (PARTITION p0 VALUES LESS THAN (1,_latin1'abc',_latin1'abc') ENGINE = MyISAM,
...@@ -313,14 +313,14 @@ a b c d ...@@ -313,14 +313,14 @@ a b c d
1 b c 1 1 b c 1
drop table t1; drop table t1;
create table t1 (a int, b varchar(2), c int) create table t1 (a int, b varchar(2), c int)
partition by range column_list (a, b, c) partition by range columns (a, b, c)
(partition p0 values less than (1, 'A', 1), (partition p0 values less than (1, 'A', 1),
partition p1 values less than (1, 'B', 1)); partition p1 values less than (1, 'B', 1));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1"; from information_schema.partitions where table_name = "t1";
partition_method partition_expression partition_description partition_method partition_expression partition_description
RANGE COLUMN_LIST a,b,c 1,'A',1 RANGE COLUMNS a,b,c 1,'A',1
RANGE COLUMN_LIST a,b,c 1,'B',1 RANGE COLUMNS a,b,c 1,'B',1
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -328,7 +328,7 @@ t1 CREATE TABLE `t1` ( ...@@ -328,7 +328,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(2) DEFAULT NULL, `b` varchar(2) DEFAULT NULL,
`c` int(11) DEFAULT NULL `c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE COLUMN_LIST(a,b,c) /*!50100 PARTITION BY RANGE COLUMNS(a,b,c)
(PARTITION p0 VALUES LESS THAN (1,_latin1'A',1) ENGINE = MyISAM, (PARTITION p0 VALUES LESS THAN (1,_latin1'A',1) ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (1,_latin1'B',1) ENGINE = MyISAM) */ PARTITION p1 VALUES LESS THAN (1,_latin1'B',1) ENGINE = MyISAM) */
insert into t1 values (1, 'A', 1); insert into t1 values (1, 'A', 1);
...@@ -340,7 +340,7 @@ a b c ...@@ -340,7 +340,7 @@ a b c
1 A 1 1 A 1
drop table t1; drop table t1;
create table t1 (a char, b char, c char) create table t1 (a char, b char, c char)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in ('a')); ( partition p0 values in ('a'));
insert into t1 (a) values ('a'); insert into t1 (a) values ('a');
select * from t1 where a = 'a'; select * from t1 where a = 'a';
...@@ -348,41 +348,41 @@ a b c ...@@ -348,41 +348,41 @@ a b c
a NULL NULL a NULL NULL
drop table t1; drop table t1;
create table t1 (d time) create table t1 (d time)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('2040-01-01')); partition p1 values less than ('2040-01-01'));
ERROR HY000: Partition column values of incorrect type ERROR HY000: Partition column values of incorrect type
create table t1 (d timestamp) create table t1 (d timestamp)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('2040-01-01')); partition p1 values less than ('2040-01-01'));
ERROR HY000: Field 'd' is of a not allowed type for this type of partitioning ERROR HY000: Field 'd' is of a not allowed type for this type of partitioning
create table t1 (d bit(1)) create table t1 (d bit(1))
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than (0), ( partition p0 values less than (0),
partition p1 values less than (1)); partition p1 values less than (1));
ERROR HY000: Field 'd' is of a not allowed type for this type of partitioning ERROR HY000: Field 'd' is of a not allowed type for this type of partitioning
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (maxvalue, 10)); (partition p0 values less than (maxvalue, 10));
drop table t1; drop table t1;
create table t1 (d date) create table t1 (d date)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('2009-01-01')); partition p1 values less than ('2009-01-01'));
drop table t1; drop table t1;
create table t1 (d date) create table t1 (d date)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('1999-01-01'), ( partition p0 values less than ('1999-01-01'),
partition p1 values less than ('2000-01-01')); partition p1 values less than ('2000-01-01'));
drop table t1; drop table t1;
create table t1 (d date) create table t1 (d date)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('3000-01-01')); partition p1 values less than ('3000-01-01'));
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p2 values less than (99,99), (partition p2 values less than (99,99),
partition p1 values less than (99,999)); partition p1 values less than (99,999));
insert into t1 values (99,998); insert into t1 values (99,998);
...@@ -397,22 +397,22 @@ data_type ...@@ -397,22 +397,22 @@ data_type
int int
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
(partition p0 values in ((maxvalue,maxvalue))); (partition p0 values in ((maxvalue,maxvalue)));
ERROR 42000: Cannot use MAXVALUE as value in VALUES IN near 'maxvalue,maxvalue)))' at line 3 ERROR 42000: Cannot use MAXVALUE as value in VALUES IN near 'maxvalue,maxvalue)))' at line 3
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (maxvalue,maxvalue)); (partition p0 values less than (maxvalue,maxvalue));
drop table t1; drop table t1;
create table t1 (a int) create table t1 (a int)
partition by list column_list(a) partition by list columns(a)
(partition p0 values in (0)); (partition p0 values in (0));
select partition_method from information_schema.partitions where table_name='t1'; select partition_method from information_schema.partitions where table_name='t1';
partition_method partition_method
LIST COLUMN_LIST LIST COLUMNS
drop table t1; drop table t1;
create table t1 (a char(6)) create table t1 (a char(6))
partition by range column_list(a) partition by range columns(a)
(partition p0 values less than ('H23456'), (partition p0 values less than ('H23456'),
partition p1 values less than ('M23456')); partition p1 values less than ('M23456'));
insert into t1 values ('F23456'); insert into t1 values ('F23456');
...@@ -421,25 +421,25 @@ a ...@@ -421,25 +421,25 @@ a
F23456 F23456
drop table t1; drop table t1;
create table t1 (a char(6)) create table t1 (a char(6))
partition by range column_list(a) partition by range columns(a)
(partition p0 values less than (H23456), (partition p0 values less than (H23456),
partition p1 values less than (M23456)); partition p1 values less than (M23456));
ERROR 42S22: Unknown column 'H23456' in 'field list' ERROR 42S22: Unknown column 'H23456' in 'field list'
create table t1 (a char(6)) create table t1 (a char(6))
partition by range column_list(a) partition by range columns(a)
(partition p0 values less than (23456), (partition p0 values less than (23456),
partition p1 values less than (23456)); partition p1 values less than (23456));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (10)); (partition p0 values less than (10));
ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3 ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (1,1,1); (partition p0 values less than (1,1,1);
ERROR HY000: Inconsistency in usage of column lists for partitioning ERROR HY000: Inconsistency in usage of column lists for partitioning
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (1, 0), (partition p0 values less than (1, 0),
partition p1 values less than (2, maxvalue), partition p1 values less than (2, maxvalue),
partition p2 values less than (3, 3), partition p2 values less than (3, 3),
...@@ -457,7 +457,7 @@ a b ...@@ -457,7 +457,7 @@ a b
4 9 4 9
9 1 9 1
alter table t1 alter table t1
partition by range column_list(b,a) partition by range columns(b,a)
(partition p0 values less than (1,2), (partition p0 values less than (1,2),
partition p1 values less than (3,3), partition p1 values less than (3,3),
partition p2 values less than (9,5)); partition p2 values less than (9,5));
...@@ -509,7 +509,7 @@ a b ...@@ -509,7 +509,7 @@ a b
9 1 9 1
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
subpartition by hash (b) subpartition by hash (b)
subpartitions 2 subpartitions 2
(partition p0 values in ((0,0), (1,1)), (partition p0 values in ((0,0), (1,1)),
...@@ -517,7 +517,7 @@ partition p1 values in ((1000,1000))); ...@@ -517,7 +517,7 @@ partition p1 values in ((1000,1000)));
insert into t1 values (1000,1000); insert into t1 values (1000,1000);
drop table t1; drop table t1;
create table t1 (a char, b char, c char) create table t1 (a char, b char, c char)
partition by range column_list(a,b,c) partition by range columns(a,b,c)
( partition p0 values less than ('a','b','c')); ( partition p0 values less than ('a','b','c'));
alter table t1 add partition alter table t1 add partition
(partition p1 values less than ('b','c','d')); (partition p1 values less than ('b','c','d'));
......
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
create table t1 (a char, b char, c char) create table t1 (a char, b char, c char)
partition by range column_list(a,b,c) partition by range columns(a,b,c)
( partition p0 values less than ('a','b','c')); ( partition p0 values less than ('a','b','c'));
insert into t1 values ('a', NULL, 'd'); insert into t1 values ('a', NULL, 'd');
explain partitions select * from t1 where a = 'a' AND c = 'd'; explain partitions select * from t1 where a = 'a' AND c = 'd';
...@@ -10,7 +10,7 @@ select * from t1 where a = 'a' AND c = 'd'; ...@@ -10,7 +10,7 @@ select * from t1 where a = 'a' AND c = 'd';
a b c a b c
a NULL d a NULL d
drop table t1; drop table t1;
create table t1 (a int not null) partition by range column_list(a) ( create table t1 (a int not null) partition by range columns(a) (
partition p0 values less than (10), partition p0 values less than (10),
partition p1 values less than (20), partition p1 values less than (20),
partition p2 values less than (30), partition p2 values less than (30),
...@@ -40,7 +40,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra ...@@ -40,7 +40,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p3,p4 ALL NULL NULL NULL NULL 4 Using where 1 SIMPLE t2 p3,p4 ALL NULL NULL NULL NULL 4 Using where
drop table t1, t2; drop table t1, t2;
create table t1 (a int not null, b int not null ) create table t1 (a int not null, b int not null )
partition by range column_list(a,b) ( partition by range columns(a,b) (
partition p01 values less than (2,10), partition p01 values less than (2,10),
partition p02 values less than (2,20), partition p02 values less than (2,20),
partition p03 values less than (2,30), partition p03 values less than (2,30),
......
drop table if exists t1; drop table if exists t1;
create table t1 (a varchar(5)) create table t1 (a varchar(5))
engine=memory engine=memory
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('m'), ( partition p0 values less than ('m'),
partition p1 values less than ('za')); partition p1 values less than ('za'));
insert into t1 values ('j'); insert into t1 values ('j');
...@@ -9,7 +9,7 @@ update t1 set a = 'z' where (a >= 'j'); ...@@ -9,7 +9,7 @@ update t1 set a = 'z' where (a >= 'j');
drop table t1; drop table t1;
create table t1 (a varchar(5)) create table t1 (a varchar(5))
engine=myisam engine=myisam
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('m'), ( partition p0 values less than ('m'),
partition p1 values less than ('za')); partition p1 values less than ('za'));
insert into t1 values ('j'); insert into t1 values ('j');
...@@ -17,7 +17,7 @@ update t1 set a = 'z' where (a >= 'j'); ...@@ -17,7 +17,7 @@ update t1 set a = 'z' where (a >= 'j');
drop table t1; drop table t1;
create table t1 (a varchar(5)) create table t1 (a varchar(5))
engine=innodb engine=innodb
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('m'), ( partition p0 values less than ('m'),
partition p1 values less than ('za')); partition p1 values less than ('za'));
insert into t1 values ('j'); insert into t1 values ('j');
......
...@@ -77,7 +77,7 @@ a ...@@ -77,7 +77,7 @@ a
2004-01-01 11:59:29 2004-01-01 11:59:29
drop table t1; drop table t1;
create table t1 (a int, b char(20)) create table t1 (a int, b char(20))
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (1)); (partition p0 values less than (1));
ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3 ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3
create table t1 (a int, b char(20)) create table t1 (a int, b char(20))
...@@ -89,7 +89,7 @@ partition by range(a) ...@@ -89,7 +89,7 @@ partition by range(a)
(partition p0 values less than (1,"b")); (partition p0 values less than (1,"b"));
ERROR HY000: Cannot have more than one value for this type of RANGE partitioning ERROR HY000: Cannot have more than one value for this type of RANGE partitioning
create table t1 (a int, b char(20)) create table t1 (a int, b char(20))
partition by range column_list(b) partition by range columns(b)
(partition p0 values less than ("b")); (partition p0 values less than ("b"));
drop table t1; drop table t1;
create table t1 (a int) create table t1 (a int)
......
...@@ -13,11 +13,11 @@ drop table if exists t1; ...@@ -13,11 +13,11 @@ drop table if exists t1;
# #
--error ER_PARTITION_FIELDS_TOO_LONG --error ER_PARTITION_FIELDS_TOO_LONG
create table t1 (a varchar(1500), b varchar(1570)) create table t1 (a varchar(1500), b varchar(1570))
partition by list column_list(a,b) partition by list columns(a,b)
( partition p0 values in (('a','b'))); ( partition p0 values in (('a','b')));
create table t1 (a varchar(1023) character set utf8 collate utf8_spanish2_ci) create table t1 (a varchar(1023) character set utf8 collate utf8_spanish2_ci)
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('CZ'), ( partition p0 values less than ('CZ'),
partition p1 values less than ('CH'), partition p1 values less than ('CH'),
partition p2 values less than ('D')); partition p2 values less than ('D'));
...@@ -31,12 +31,12 @@ drop table t1; ...@@ -31,12 +31,12 @@ drop table t1;
set @@sql_mode=allow_invalid_dates; set @@sql_mode=allow_invalid_dates;
--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR --error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
create table t1 (a char, b char, c date) create table t1 (a char, b char, c date)
partition by range column_list (a,b,c) partition by range columns (a,b,c)
( partition p0 values less than (0,0,to_days('3000-11-31'))); ( partition p0 values less than (0,0,to_days('3000-11-31')));
--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR --error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
create table t1 (a char, b char, c date) create table t1 (a char, b char, c date)
partition by range column_list (a,b,c) partition by range columns (a,b,c)
( partition p0 values less than (0,0,'3000-11-31')); ( partition p0 values less than (0,0,'3000-11-31'));
set @@sql_mode=''; set @@sql_mode='';
...@@ -44,7 +44,7 @@ set @@sql_mode=''; ...@@ -44,7 +44,7 @@ set @@sql_mode='';
# BUG#48163, Dagger in UCS2 not working as partition value # BUG#48163, Dagger in UCS2 not working as partition value
# #
create table t1 (a varchar(2) character set ucs2) create table t1 (a varchar(2) character set ucs2)
partition by list column_list (a) partition by list columns (a)
(partition p0 values in (0x2020), (partition p0 values in (0x2020),
partition p1 values in ('')); partition p1 values in (''));
show create table t1; show create table t1;
...@@ -53,7 +53,7 @@ insert into t1 values (_ucs2 0x2020); ...@@ -53,7 +53,7 @@ insert into t1 values (_ucs2 0x2020);
drop table t1; drop table t1;
create table t1 (a int, b char(10), c varchar(25), d datetime) create table t1 (a int, b char(10), c varchar(25), d datetime)
partition by range column_list(a,b,c,d) partition by range columns(a,b,c,d)
subpartition by hash (to_seconds(d)) subpartition by hash (to_seconds(d))
subpartitions 4 subpartitions 4
( partition p0 values less than (1, 0, MAXVALUE, '1900-01-01'), ( partition p0 values less than (1, 0, MAXVALUE, '1900-01-01'),
...@@ -67,16 +67,16 @@ drop table t1; ...@@ -67,16 +67,16 @@ drop table t1;
--error ER_NULL_IN_VALUES_LESS_THAN --error ER_NULL_IN_VALUES_LESS_THAN
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list (a,b) partition by range columns (a,b)
(partition p0 values less than (NULL, maxvalue)); (partition p0 values less than (NULL, maxvalue));
--error ER_MAXVALUE_IN_VALUES_IN, ER_PARSE_ERROR --error ER_MAXVALUE_IN_VALUES_IN, ER_PARSE_ERROR
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
( partition p0 values in ((maxvalue, 0))); ( partition p0 values in ((maxvalue, 0)));
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list (a,b) partition by list columns (a,b)
( partition p0 values in ((0,0))); ( partition p0 values in ((0,0)));
--error ER_MAXVALUE_IN_VALUES_IN, ER_PARSE_ERROR --error ER_MAXVALUE_IN_VALUES_IN, ER_PARSE_ERROR
alter table t1 add partition alter table t1 add partition
...@@ -90,7 +90,7 @@ create table t1 (a int, b int) ...@@ -90,7 +90,7 @@ create table t1 (a int, b int)
partition by key (a,a); partition by key (a,a);
--error ER_SAME_NAME_PARTITION_FIELD --error ER_SAME_NAME_PARTITION_FIELD
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,a) partition by list columns(a,a)
( partition p values in ((1,1))); ( partition p values in ((1,1)));
# #
...@@ -108,7 +108,7 @@ select * from t1 where a <= 1; ...@@ -108,7 +108,7 @@ select * from t1 where a <= 1;
drop table t1; drop table t1;
create table t1 (a int signed) create table t1 (a int signed)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in (1, 3, 5, 7, 9, NULL), ( partition p0 values in (1, 3, 5, 7, 9, NULL),
partition p1 values in (2, 4, 6, 8, 0)); partition p1 values in (2, 4, 6, 8, 0));
insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8); insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8);
...@@ -119,7 +119,7 @@ select * from t1 where a <= 1; ...@@ -119,7 +119,7 @@ select * from t1 where a <= 1;
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
( partition p0 values in ((1, NULL), (2, NULL), (NULL, NULL)), ( partition p0 values in ((1, NULL), (2, NULL), (NULL, NULL)),
partition p1 values in ((1,1), (2,2)), partition p1 values in ((1,1), (2,2)),
partition p2 values in ((3, NULL), (NULL, 1))); partition p2 values in ((3, NULL), (NULL, 1)));
...@@ -167,12 +167,12 @@ drop table t1; ...@@ -167,12 +167,12 @@ drop table t1;
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
create table t1 (a int) create table t1 (a int)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in (2, 1), ( partition p0 values in (2, 1),
partition p1 values in ((4), (NULL), (3))); partition p1 values in ((4), (NULL), (3)));
create table t1 (a int) create table t1 (a int)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in (2, 1), ( partition p0 values in (2, 1),
partition p1 values in (4, NULL, 3)); partition p1 values in (4, NULL, 3));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
...@@ -189,7 +189,7 @@ show create table t1; ...@@ -189,7 +189,7 @@ show create table t1;
drop table t1; drop table t1;
create table t1 (a int, b char(10), c varchar(5), d int) create table t1 (a int, b char(10), c varchar(5), d int)
partition by range column_list(a,b,c) partition by range columns(a,b,c)
subpartition by key (c,d) subpartition by key (c,d)
subpartitions 3 subpartitions 3
( partition p0 values less than (1,'abc','abc'), ( partition p0 values less than (1,'abc','abc'),
...@@ -209,7 +209,7 @@ select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) O ...@@ -209,7 +209,7 @@ select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) O
drop table t1; drop table t1;
create table t1 (a int, b varchar(2), c int) create table t1 (a int, b varchar(2), c int)
partition by range column_list (a, b, c) partition by range columns (a, b, c)
(partition p0 values less than (1, 'A', 1), (partition p0 values less than (1, 'A', 1),
partition p1 values less than (1, 'B', 1)); partition p1 values less than (1, 'B', 1));
select partition_method, partition_expression, partition_description select partition_method, partition_expression, partition_description
...@@ -221,7 +221,7 @@ select * from t1 where a = 1 AND b <= 'A' and c = 1; ...@@ -221,7 +221,7 @@ select * from t1 where a = 1 AND b <= 'A' and c = 1;
drop table t1; drop table t1;
create table t1 (a char, b char, c char) create table t1 (a char, b char, c char)
partition by list column_list(a) partition by list columns(a)
( partition p0 values in ('a')); ( partition p0 values in ('a'));
insert into t1 (a) values ('a'); insert into t1 (a) values ('a');
select * from t1 where a = 'a'; select * from t1 where a = 'a';
...@@ -229,47 +229,47 @@ drop table t1; ...@@ -229,47 +229,47 @@ drop table t1;
--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR --error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
create table t1 (d time) create table t1 (d time)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('2040-01-01')); partition p1 values less than ('2040-01-01'));
--error ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD --error ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD
create table t1 (d timestamp) create table t1 (d timestamp)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('2040-01-01')); partition p1 values less than ('2040-01-01'));
--error ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD --error ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD
create table t1 (d bit(1)) create table t1 (d bit(1))
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than (0), ( partition p0 values less than (0),
partition p1 values less than (1)); partition p1 values less than (1));
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (maxvalue, 10)); (partition p0 values less than (maxvalue, 10));
drop table t1; drop table t1;
create table t1 (d date) create table t1 (d date)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('2009-01-01')); partition p1 values less than ('2009-01-01'));
drop table t1; drop table t1;
create table t1 (d date) create table t1 (d date)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('1999-01-01'), ( partition p0 values less than ('1999-01-01'),
partition p1 values less than ('2000-01-01')); partition p1 values less than ('2000-01-01'));
drop table t1; drop table t1;
create table t1 (d date) create table t1 (d date)
partition by range column_list(d) partition by range columns(d)
( partition p0 values less than ('2000-01-01'), ( partition p0 values less than ('2000-01-01'),
partition p1 values less than ('3000-01-01')); partition p1 values less than ('3000-01-01'));
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p2 values less than (99,99), (partition p2 values less than (99,99),
partition p1 values less than (99,999)); partition p1 values less than (99,999));
...@@ -284,21 +284,21 @@ drop table t1; ...@@ -284,21 +284,21 @@ drop table t1;
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
(partition p0 values in ((maxvalue,maxvalue))); (partition p0 values in ((maxvalue,maxvalue)));
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (maxvalue,maxvalue)); (partition p0 values less than (maxvalue,maxvalue));
drop table t1; drop table t1;
create table t1 (a int) create table t1 (a int)
partition by list column_list(a) partition by list columns(a)
(partition p0 values in (0)); (partition p0 values in (0));
select partition_method from information_schema.partitions where table_name='t1'; select partition_method from information_schema.partitions where table_name='t1';
drop table t1; drop table t1;
create table t1 (a char(6)) create table t1 (a char(6))
partition by range column_list(a) partition by range columns(a)
(partition p0 values less than ('H23456'), (partition p0 values less than ('H23456'),
partition p1 values less than ('M23456')); partition p1 values less than ('M23456'));
insert into t1 values ('F23456'); insert into t1 values ('F23456');
...@@ -307,28 +307,28 @@ drop table t1; ...@@ -307,28 +307,28 @@ drop table t1;
-- error 1054 -- error 1054
create table t1 (a char(6)) create table t1 (a char(6))
partition by range column_list(a) partition by range columns(a)
(partition p0 values less than (H23456), (partition p0 values less than (H23456),
partition p1 values less than (M23456)); partition p1 values less than (M23456));
-- error ER_RANGE_NOT_INCREASING_ERROR -- error ER_RANGE_NOT_INCREASING_ERROR
create table t1 (a char(6)) create table t1 (a char(6))
partition by range column_list(a) partition by range columns(a)
(partition p0 values less than (23456), (partition p0 values less than (23456),
partition p1 values less than (23456)); partition p1 values less than (23456));
-- error 1064 -- error 1064
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (10)); (partition p0 values less than (10));
-- error ER_PARTITION_COLUMN_LIST_ERROR -- error ER_PARTITION_COLUMN_LIST_ERROR
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (1,1,1); (partition p0 values less than (1,1,1);
create table t1 (a int, b int) create table t1 (a int, b int)
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (1, 0), (partition p0 values less than (1, 0),
partition p1 values less than (2, maxvalue), partition p1 values less than (2, maxvalue),
partition p2 values less than (3, 3), partition p2 values less than (3, 3),
...@@ -340,7 +340,7 @@ insert into t1 values (0,1),(1,1),(2,1),(3,1),(3,4),(4,9),(9,1); ...@@ -340,7 +340,7 @@ insert into t1 values (0,1),(1,1),(2,1),(3,1),(3,4),(4,9),(9,1);
select * from t1; select * from t1;
alter table t1 alter table t1
partition by range column_list(b,a) partition by range columns(b,a)
(partition p0 values less than (1,2), (partition p0 values less than (1,2),
partition p1 values less than (3,3), partition p1 values less than (3,3),
partition p2 values less than (9,5)); partition p2 values less than (9,5));
...@@ -374,7 +374,7 @@ select * from t1 where b < 4; ...@@ -374,7 +374,7 @@ select * from t1 where b < 4;
drop table t1; drop table t1;
create table t1 (a int, b int) create table t1 (a int, b int)
partition by list column_list(a,b) partition by list columns(a,b)
subpartition by hash (b) subpartition by hash (b)
subpartitions 2 subpartitions 2
(partition p0 values in ((0,0), (1,1)), (partition p0 values in ((0,0), (1,1)),
...@@ -384,7 +384,7 @@ insert into t1 values (1000,1000); ...@@ -384,7 +384,7 @@ insert into t1 values (1000,1000);
drop table t1; drop table t1;
create table t1 (a char, b char, c char) create table t1 (a char, b char, c char)
partition by range column_list(a,b,c) partition by range columns(a,b,c)
( partition p0 values less than ('a','b','c')); ( partition p0 values less than ('a','b','c'));
alter table t1 add partition alter table t1 add partition
(partition p1 values less than ('b','c','d')); (partition p1 values less than ('b','c','d'));
......
...@@ -8,7 +8,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; ...@@ -8,7 +8,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings --enable_warnings
create table t1 (a char, b char, c char) create table t1 (a char, b char, c char)
partition by range column_list(a,b,c) partition by range columns(a,b,c)
( partition p0 values less than ('a','b','c')); ( partition p0 values less than ('a','b','c'));
insert into t1 values ('a', NULL, 'd'); insert into t1 values ('a', NULL, 'd');
explain partitions select * from t1 where a = 'a' AND c = 'd'; explain partitions select * from t1 where a = 'a' AND c = 'd';
...@@ -16,7 +16,7 @@ select * from t1 where a = 'a' AND c = 'd'; ...@@ -16,7 +16,7 @@ select * from t1 where a = 'a' AND c = 'd';
drop table t1; drop table t1;
## COLUMN_LIST partition pruning tests ## COLUMN_LIST partition pruning tests
create table t1 (a int not null) partition by range column_list(a) ( create table t1 (a int not null) partition by range columns(a) (
partition p0 values less than (10), partition p0 values less than (10),
partition p1 values less than (20), partition p1 values less than (20),
partition p2 values less than (30), partition p2 values less than (30),
...@@ -46,7 +46,7 @@ explain partitions select * from t2 where a > 35 and a < 45; ...@@ -46,7 +46,7 @@ explain partitions select * from t2 where a > 35 and a < 45;
drop table t1, t2; drop table t1, t2;
create table t1 (a int not null, b int not null ) create table t1 (a int not null, b int not null )
partition by range column_list(a,b) ( partition by range columns(a,b) (
partition p01 values less than (2,10), partition p01 values less than (2,10),
partition p02 values less than (2,20), partition p02 values less than (2,20),
partition p03 values less than (2,30), partition p03 values less than (2,30),
......
...@@ -10,7 +10,7 @@ drop table if exists t1; ...@@ -10,7 +10,7 @@ drop table if exists t1;
# #
create table t1 (a varchar(5)) create table t1 (a varchar(5))
engine=memory engine=memory
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('m'), ( partition p0 values less than ('m'),
partition p1 values less than ('za')); partition p1 values less than ('za'));
insert into t1 values ('j'); insert into t1 values ('j');
...@@ -19,7 +19,7 @@ drop table t1; ...@@ -19,7 +19,7 @@ drop table t1;
create table t1 (a varchar(5)) create table t1 (a varchar(5))
engine=myisam engine=myisam
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('m'), ( partition p0 values less than ('m'),
partition p1 values less than ('za')); partition p1 values less than ('za'));
insert into t1 values ('j'); insert into t1 values ('j');
...@@ -28,7 +28,7 @@ drop table t1; ...@@ -28,7 +28,7 @@ drop table t1;
create table t1 (a varchar(5)) create table t1 (a varchar(5))
engine=innodb engine=innodb
partition by range column_list(a) partition by range columns(a)
( partition p0 values less than ('m'), ( partition p0 values less than ('m'),
partition p1 values less than ('za')); partition p1 values less than ('za'));
insert into t1 values ('j'); insert into t1 values ('j');
......
...@@ -63,7 +63,7 @@ drop table t1; ...@@ -63,7 +63,7 @@ drop table t1;
# #
--error 1064 --error 1064
create table t1 (a int, b char(20)) create table t1 (a int, b char(20))
partition by range column_list(a,b) partition by range columns(a,b)
(partition p0 values less than (1)); (partition p0 values less than (1));
--error ER_TOO_MANY_VALUES_ERROR --error ER_TOO_MANY_VALUES_ERROR
...@@ -77,7 +77,7 @@ partition by range(a) ...@@ -77,7 +77,7 @@ partition by range(a)
(partition p0 values less than (1,"b")); (partition p0 values less than (1,"b"));
create table t1 (a int, b char(20)) create table t1 (a int, b char(20))
partition by range column_list(b) partition by range columns(b)
(partition p0 values less than ("b")); (partition p0 values less than ("b"));
drop table t1; drop table t1;
......
...@@ -119,7 +119,6 @@ static SYMBOL symbols[] = { ...@@ -119,7 +119,6 @@ static SYMBOL symbols[] = {
{ "COLUMN", SYM(COLUMN_SYM)}, { "COLUMN", SYM(COLUMN_SYM)},
{ "COLUMN_NAME", SYM(COLUMN_NAME_SYM)}, { "COLUMN_NAME", SYM(COLUMN_NAME_SYM)},
{ "COLUMNS", SYM(COLUMNS)}, { "COLUMNS", SYM(COLUMNS)},
{ "COLUMN_LIST", SYM(COLUMN_LIST_SYM)},
{ "COMMENT", SYM(COMMENT_SYM)}, { "COMMENT", SYM(COMMENT_SYM)},
{ "COMMIT", SYM(COMMIT_SYM)}, { "COMMIT", SYM(COMMIT_SYM)},
{ "COMMITTED", SYM(COMMITTED_SYM)}, { "COMMITTED", SYM(COMMITTED_SYM)},
......
...@@ -3251,7 +3251,7 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree) ...@@ -3251,7 +3251,7 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
/* /*
We need to call the interval mapper if we have a condition which We need to call the interval mapper if we have a condition which
makes sense to prune on. In the example of a COLUMN_LIST on a and makes sense to prune on. In the example of COLUMNS on a and
b it makes sense if we have a condition on a, or conditions on b it makes sense if we have a condition on a, or conditions on
both a and b. If we only have conditions on b it might make sense both a and b. If we only have conditions on b it might make sense
but this is a harder case we will solve later. For the harder case but this is a harder case we will solve later. For the harder case
......
...@@ -68,7 +68,7 @@ const LEX_STRING partition_keywords[]= ...@@ -68,7 +68,7 @@ const LEX_STRING partition_keywords[]=
{ C_STRING_WITH_LEN("KEY") }, { C_STRING_WITH_LEN("KEY") },
{ C_STRING_WITH_LEN("MAXVALUE") }, { C_STRING_WITH_LEN("MAXVALUE") },
{ C_STRING_WITH_LEN("LINEAR ") }, { C_STRING_WITH_LEN("LINEAR ") },
{ C_STRING_WITH_LEN(" COLUMN_LIST") } { C_STRING_WITH_LEN(" COLUMNS") }
}; };
static const char *part_str= "PARTITION"; static const char *part_str= "PARTITION";
static const char *subpart_str= "SUBPARTITION"; static const char *subpart_str= "SUBPARTITION";
...@@ -6925,7 +6925,7 @@ void make_used_partitions_str(partition_info *part_info, String *parts_str) ...@@ -6925,7 +6925,7 @@ void make_used_partitions_str(partition_info *part_info, String *parts_str)
(1) is applicable for "PARTITION BY <RANGE|LIST>(func(t.field))", where (1) is applicable for "PARTITION BY <RANGE|LIST>(func(t.field))", where
func is a monotonic function. func is a monotonic function.
(2) is applicable for "PARTITION BY <RANGE|LIST> COLUMN_LIST (field_list) (2) is applicable for "PARTITION BY <RANGE|LIST> COLUMNS (field_list)
(3) is applicable for (3) is applicable for
"[SUB]PARTITION BY <any-partitioning-type>(any_func(t.integer_field))" "[SUB]PARTITION BY <any-partitioning-type>(any_func(t.integer_field))"
...@@ -7624,7 +7624,7 @@ uint32 get_next_partition_id_range(PARTITION_ITERATOR* part_iter) ...@@ -7624,7 +7624,7 @@ uint32 get_next_partition_id_range(PARTITION_ITERATOR* part_iter)
DESCRIPTION DESCRIPTION
This implementation of PARTITION_ITERATOR::get_next() is special for This implementation of PARTITION_ITERATOR::get_next() is special for
LIST partitioning: it enumerates partition ids in LIST partitioning: it enumerates partition ids in
part_info->list_array[i] (list_col_array[i] for COLUMN_LIST LIST part_info->list_array[i] (list_col_array[i] for COLUMNS LIST
partitioning) where i runs over [min_idx, max_idx] interval. partitioning) where i runs over [min_idx, max_idx] interval.
The function conforms to partition_iter_func type. The function conforms to partition_iter_func type.
......
...@@ -611,7 +611,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); ...@@ -611,7 +611,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token COLLATE_SYM /* SQL-2003-R */ %token COLLATE_SYM /* SQL-2003-R */
%token COLLATION_SYM /* SQL-2003-N */ %token COLLATION_SYM /* SQL-2003-N */
%token COLUMNS %token COLUMNS
%token COLUMN_LIST_SYM
%token COLUMN_SYM /* SQL-2003-R */ %token COLUMN_SYM /* SQL-2003-R */
%token COLUMN_NAME_SYM /* SQL-2003-N */ %token COLUMN_NAME_SYM /* SQL-2003-N */
%token COMMENT_SYM %token COMMENT_SYM
...@@ -4121,7 +4120,7 @@ part_field_item: ...@@ -4121,7 +4120,7 @@ part_field_item:
; ;
part_column_list: part_column_list:
COLUMN_LIST_SYM '(' part_field_list ')' COLUMNS '(' part_field_list ')'
{ {
partition_info *part_info= Lex->part_info; partition_info *part_info= Lex->part_info;
part_info->column_list= TRUE; part_info->column_list= TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment