diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-05-07 13:05:09 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-05-07 13:05:09 +0200 |
commit | b381cf843c841151f96541b19bd753cd3bbae326 (patch) | |
tree | dfc377a1dfbd4d2044a0b799ff5ed6411c7e864f /sql/sql_yacc.yy | |
parent | d4be9e7bc0cfd5ddd444ecc64daa4166597ca2eb (diff) | |
parent | e5055e22f1f311fa48457cfcc97b72e93a37329f (diff) | |
download | mariadb-git-b381cf843c841151f96541b19bd753cd3bbae326.tar.gz |
mysql-5.5.31 merge
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 8f88f3304e6..c89585ec609 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2010, 2011 Monty Program Ab + Copyright (c) 2000, 2013, Oracle and/or its affiliates. + Copyright (c) 2010, 2011, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -4418,7 +4418,7 @@ partition: ; part_type_def: - opt_linear KEY_SYM '(' part_field_list ')' + opt_linear KEY_SYM opt_key_algo '(' part_field_list ')' { partition_info *part_info= Lex->part_info; part_info->list_of_part_fields= TRUE; @@ -4444,6 +4444,25 @@ opt_linear: { Lex->part_info->linear_hash_ind= TRUE;} ; +opt_key_algo: + /* empty */ + { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;} + | ALGORITHM_SYM EQ real_ulong_num + { + switch ($3) { + case 1: + Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_51; + break; + case 2: + Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_55; + break; + default: + my_parse_error(ER(ER_SYNTAX_ERROR)); + MYSQL_YYABORT; + } + } + ; + part_field_list: /* empty */ {} | part_field_item_list {} @@ -4525,7 +4544,7 @@ opt_sub_part: | SUBPARTITION_SYM BY opt_linear HASH_SYM sub_part_func { Lex->part_info->subpart_type= HASH_PARTITION; } opt_num_subparts {} - | SUBPARTITION_SYM BY opt_linear KEY_SYM + | SUBPARTITION_SYM BY opt_linear KEY_SYM opt_key_algo '(' sub_part_field_list ')' { partition_info *part_info= Lex->part_info; |