Commit 40496deb authored by Mikael Ronstrom's avatar Mikael Ronstrom

Changed COLUMN_LIST to COLUMNS after arch review

parent 840d7eb4
This diff is collapsed.
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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'));
insert into t1 values ('a', NULL, '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';
a b c
a NULL d
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 p1 values less than (20),
partition p2 values less than (30),
......@@ -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
drop table t1, t2;
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 p02 values less than (2,20),
partition p03 values less than (2,30),
......
drop table if exists t1;
create table t1 (a varchar(5))
engine=memory
partition by range column_list(a)
partition by range columns(a)
( partition p0 values less than ('m'),
partition p1 values less than ('za'));
insert into t1 values ('j');
......@@ -9,7 +9,7 @@ update t1 set a = 'z' where (a >= 'j');
drop table t1;
create table t1 (a varchar(5))
engine=myisam
partition by range column_list(a)
partition by range columns(a)
( partition p0 values less than ('m'),
partition p1 values less than ('za'));
insert into t1 values ('j');
......@@ -17,7 +17,7 @@ update t1 set a = 'z' where (a >= 'j');
drop table t1;
create table t1 (a varchar(5))
engine=innodb
partition by range column_list(a)
partition by range columns(a)
( partition p0 values less than ('m'),
partition p1 values less than ('za'));
insert into t1 values ('j');
......
......@@ -77,7 +77,7 @@ a
2004-01-01 11:59:29
drop table t1;
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));
ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3
create table t1 (a int, b char(20))
......@@ -89,7 +89,7 @@ partition by range(a)
(partition p0 values less than (1,"b"));
ERROR HY000: Cannot have more than one value for this type of RANGE partitioning
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"));
drop table t1;
create table t1 (a int)
......
......@@ -13,11 +13,11 @@ drop table if exists t1;
#
--error ER_PARTITION_FIELDS_TOO_LONG
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')));
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 p1 values less than ('CH'),
partition p2 values less than ('D'));
......@@ -31,12 +31,12 @@ drop table t1;
set @@sql_mode=allow_invalid_dates;
--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
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')));
--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
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'));
set @@sql_mode='';
......@@ -44,7 +44,7 @@ set @@sql_mode='';
# BUG#48163, Dagger in UCS2 not working as partition value
#
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 p1 values in (''));
show create table t1;
......@@ -53,7 +53,7 @@ insert into t1 values (_ucs2 0x2020);
drop table t1;
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))
subpartitions 4
( partition p0 values less than (1, 0, MAXVALUE, '1900-01-01'),
......@@ -67,16 +67,16 @@ drop table t1;
--error ER_NULL_IN_VALUES_LESS_THAN
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));
--error ER_MAXVALUE_IN_VALUES_IN, ER_PARSE_ERROR
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)));
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)));
--error ER_MAXVALUE_IN_VALUES_IN, ER_PARSE_ERROR
alter table t1 add partition
......@@ -90,7 +90,7 @@ create table t1 (a int, b int)
partition by key (a,a);
--error ER_SAME_NAME_PARTITION_FIELD
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)));
#
......@@ -108,7 +108,7 @@ select * from t1 where a <= 1;
drop table t1;
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 p1 values in (2, 4, 6, 8, 0));
insert into t1 values (NULL),(0),(1),(2),(2),(4),(4),(4),(8),(8);
......@@ -119,7 +119,7 @@ select * from t1 where a <= 1;
drop table t1;
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 p1 values in ((1,1), (2,2)),
partition p2 values in ((3, NULL), (NULL, 1)));
......@@ -167,12 +167,12 @@ drop table t1;
--error ER_PARSE_ERROR
create table t1 (a int)
partition by list column_list(a)
partition by list columns(a)
( partition p0 values in (2, 1),
partition p1 values in ((4), (NULL), (3)));
create table t1 (a int)
partition by list column_list(a)
partition by list columns(a)
( partition p0 values in (2, 1),
partition p1 values in (4, NULL, 3));
select partition_method, partition_expression, partition_description
......@@ -189,7 +189,7 @@ show create table t1;
drop table t1;
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)
subpartitions 3
( 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
drop table t1;
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 p1 values less than (1, 'B', 1));
select partition_method, partition_expression, partition_description
......@@ -221,7 +221,7 @@ select * from t1 where a = 1 AND b <= 'A' and c = 1;
drop table t1;
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'));
insert into t1 (a) values ('a');
select * from t1 where a = 'a';
......@@ -229,47 +229,47 @@ drop table t1;
--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR
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 p1 values less than ('2040-01-01'));
--error ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD
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 p1 values less than ('2040-01-01'));
--error ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD
create table t1 (d bit(1))
partition by range column_list(d)
partition by range columns(d)
( partition p0 values less than (0),
partition p1 values less than (1));
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));
drop table t1;
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 p1 values less than ('2009-01-01'));
drop table t1;
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 p1 values less than ('2000-01-01'));
drop table t1;
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 p1 values less than ('3000-01-01'));
drop table t1;
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 p1 values less than (99,999));
......@@ -284,21 +284,21 @@ drop table t1;
--error ER_PARSE_ERROR
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)));
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));
drop table t1;
create table t1 (a int)
partition by list column_list(a)
partition by list columns(a)
(partition p0 values in (0));
select partition_method from information_schema.partitions where table_name='t1';
drop table t1;
create table t1 (a char(6))
partition by range column_list(a)
partition by range columns(a)
(partition p0 values less than ('H23456'),
partition p1 values less than ('M23456'));
insert into t1 values ('F23456');
......@@ -307,28 +307,28 @@ drop table t1;
-- error 1054
create table t1 (a char(6))
partition by range column_list(a)
partition by range columns(a)
(partition p0 values less than (H23456),
partition p1 values less than (M23456));
-- error ER_RANGE_NOT_INCREASING_ERROR
create table t1 (a char(6))
partition by range column_list(a)
partition by range columns(a)
(partition p0 values less than (23456),
partition p1 values less than (23456));
-- error 1064
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));
-- error ER_PARTITION_COLUMN_LIST_ERROR
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);
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 p1 values less than (2, maxvalue),
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);
select * from 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 p1 values less than (3,3),
partition p2 values less than (9,5));
......@@ -374,7 +374,7 @@ select * from t1 where b < 4;
drop table t1;
create table t1 (a int, b int)
partition by list column_list(a,b)
partition by list columns(a,b)
subpartition by hash (b)
subpartitions 2
(partition p0 values in ((0,0), (1,1)),
......@@ -384,7 +384,7 @@ insert into t1 values (1000,1000);
drop table t1;
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'));
alter table t1 add partition
(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;
--enable_warnings
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'));
insert into t1 values ('a', NULL, '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';
drop table t1;
## 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 p1 values less than (20),
partition p2 values less than (30),
......@@ -46,7 +46,7 @@ explain partitions select * from t2 where a > 35 and a < 45;
drop table t1, t2;
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 p02 values less than (2,20),
partition p03 values less than (2,30),
......
......@@ -10,7 +10,7 @@ drop table if exists t1;
#
create table t1 (a varchar(5))
engine=memory
partition by range column_list(a)
partition by range columns(a)
( partition p0 values less than ('m'),
partition p1 values less than ('za'));
insert into t1 values ('j');
......@@ -19,7 +19,7 @@ drop table t1;
create table t1 (a varchar(5))
engine=myisam
partition by range column_list(a)
partition by range columns(a)
( partition p0 values less than ('m'),
partition p1 values less than ('za'));
insert into t1 values ('j');
......@@ -28,7 +28,7 @@ drop table t1;
create table t1 (a varchar(5))
engine=innodb
partition by range column_list(a)
partition by range columns(a)
( partition p0 values less than ('m'),
partition p1 values less than ('za'));
insert into t1 values ('j');
......
......@@ -63,7 +63,7 @@ drop table t1;
#
--error 1064
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));
--error ER_TOO_MANY_VALUES_ERROR
......@@ -77,7 +77,7 @@ partition by range(a)
(partition p0 values less than (1,"b"));
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"));
drop table t1;
......
......@@ -119,7 +119,6 @@ static SYMBOL symbols[] = {
{ "COLUMN", SYM(COLUMN_SYM)},
{ "COLUMN_NAME", SYM(COLUMN_NAME_SYM)},
{ "COLUMNS", SYM(COLUMNS)},
{ "COLUMN_LIST", SYM(COLUMN_LIST_SYM)},
{ "COMMENT", SYM(COMMENT_SYM)},
{ "COMMIT", SYM(COMMIT_SYM)},
{ "COMMITTED", SYM(COMMITTED_SYM)},
......
......@@ -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
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
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
......
......@@ -68,7 +68,7 @@ const LEX_STRING partition_keywords[]=
{ C_STRING_WITH_LEN("KEY") },
{ C_STRING_WITH_LEN("MAXVALUE") },
{ 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 *subpart_str= "SUBPARTITION";
......@@ -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
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
"[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)
DESCRIPTION
This implementation of PARTITION_ITERATOR::get_next() is special for
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.
The function conforms to partition_iter_func type.
......
......@@ -611,7 +611,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token COLLATE_SYM /* SQL-2003-R */
%token COLLATION_SYM /* SQL-2003-N */
%token COLUMNS
%token COLUMN_LIST_SYM
%token COLUMN_SYM /* SQL-2003-R */
%token COLUMN_NAME_SYM /* SQL-2003-N */
%token COMMENT_SYM
......@@ -4121,7 +4120,7 @@ part_field_item:
;
part_column_list:
COLUMN_LIST_SYM '(' part_field_list ')'
COLUMNS '(' part_field_list ')'
{
partition_info *part_info= Lex->part_info;
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