diff options
author | Igor Babaev <igor@askmonty.org> | 2012-08-18 22:18:46 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-08-18 22:18:46 -0700 |
commit | fd7059d20859863a146cd306b88ac6e9817622fd (patch) | |
tree | 681350c033109ebff13aea42ec24a30074e89bdb /sql | |
parent | 584cfcbebd39981cc144f93cbfb007592e538989 (diff) | |
download | mariadb-git-fd7059d20859863a146cd306b88ac6e9817622fd.tar.gz |
Fixed the following problem: the syntax of the ANALYZE command did not
returned an error if the list of the specified index names contained
the name 'primary'.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_yacc.yy | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e2d2b1cac84..13c6cd3aded 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1597,7 +1597,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); analyze_table_list analyze_table_elem_spec opt_persistent_stat_clause persistent_stat_spec persistent_column_stat_spec persistent_index_stat_spec - table_column_list table_index_list + table_column_list table_index_list table_index_name check start checksum field_list field_list_item field_spec kill column_def key_def keycache_list keycache_list_or_parts assign_to_keycache @@ -7312,17 +7312,24 @@ table_column_list: table_index_list: /* empty */ {} - | ident + | table_index_name + | table_index_list ',' table_index_name + ; + +table_index_name: + ident { - Lex->index_list->push_back((LEX_STRING*) - sql_memdup(&$1, sizeof(LEX_STRING))); + Lex->index_list->push_back( + (LEX_STRING*) sql_memdup(&$1, sizeof(LEX_STRING))); } - | table_index_list ',' ident + | + PRIMARY_SYM { - Lex->index_list->push_back((LEX_STRING*) - sql_memdup(&$3, sizeof(LEX_STRING))); - } - ; + LEX_STRING str= {(char*) "PRIMARY", 7}; + Lex->index_list->push_back( + (LEX_STRING*) sql_memdup(&str, sizeof(LEX_STRING))); + } + ; binlog_base64_event: BINLOG_SYM TEXT_STRING_sys |