| Thread Previous • Date Previous • Date Next • Thread Next |
Hi, Sergei.
remove your new opt_if_not_exists_ident rule, write it like
- normal_key_type opt_ident key_alg '(' key_list ')'
+ normal_key_type opt_if_not_exists opt_ident key_alg '(' key_list ')'
I don't think it's a good idea. The 'opt_if_not_exists_ident' actually has the body:
opt_if_not_exists_ident:
opt_if_not_exists opt_ident
{
LEX *lex= Lex;
if (lex->check_exists && lex->sql_command != SQLCOM_ALTER_TABLE)
{
my_parse_error(ER(ER_SYNTAX_ERROR));
MYSQL_YYABORT;
}
$$= $2;
};
And i'd need to copy this everywhere instead of opt_**_ident call.
Best regards.
HF
25.03.2013 14:40, Sergei Golubchik wrote:
Hi, Holyfoot! Please push, with one little change: On Feb 19, holyfoot@xxxxxxxxxxxx wrote:message: MDEV-318 IF (NOT) EXIST clauses for ALTER TABLE (MWL #252). Syntax modified to allow statements: ALTER TABLE ADD/DROP COLUMN ALTER TABLE ADD/DROP INDEX ALTER TABLE ADD/DROP FOREIGN KEY ALTER TABLE ADD/DROP PARTITION ALTER TABLE CHANGE COLUMN ALTER TABLE MODIFY COLUMN DROP INDEX to have IF (NOT) EXISTS options. Appropriate implementations added to mysql_alter_table()....key_def: - normal_key_type opt_ident key_alg '(' key_list ')' + normal_key_type opt_if_not_exists_ident key_alg '(' key_list ')' { Lex->option_list= NULL; }remove your new opt_if_not_exists_ident rule, write it like - normal_key_type opt_ident key_alg '(' key_list ')' + normal_key_type opt_if_not_exists opt_ident key_alg '(' key_list ')' Regards, Sergei
| Thread Previous • Date Previous • Date Next • Thread Next |