Commit c65daf02 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

make compatible parser in sync with main one

parent 00906719
...@@ -1538,6 +1538,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); ...@@ -1538,6 +1538,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
set_assign set_assign
sf_tail_standalone sf_tail_standalone
sp_tail_standalone sp_tail_standalone
opt_constraint_no_id
END_OF_INPUT END_OF_INPUT
%type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt %type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt
...@@ -6564,6 +6565,11 @@ check_constraint: ...@@ -6564,6 +6565,11 @@ check_constraint:
} }
; ;
opt_constraint_no_id:
/* Empty */ {}
| CONSTRAINT {}
;
opt_constraint: opt_constraint:
/* empty */ { $$= null_clex_str; } /* empty */ { $$= null_clex_str; }
| constraint { $$= $1; } | constraint { $$= $1; }
...@@ -8314,7 +8320,7 @@ alter_list_item: ...@@ -8314,7 +8320,7 @@ alter_list_item:
lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY; lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY;
} }
| DROP PRIMARY_SYM KEY_SYM | DROP opt_constraint_no_id PRIMARY_SYM KEY_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root) Alter_drop *ad= (new (thd->mem_root)
...@@ -8824,8 +8830,17 @@ binlog_base64_event: ...@@ -8824,8 +8830,17 @@ binlog_base64_event:
{ {
Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT; Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
Lex->comment= $2; Lex->comment= $2;
Lex->ident.str= NULL;
Lex->ident.length= 0;
} }
; |
BINLOG_SYM '@' ident_or_text ',' '@' ident_or_text
{
Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
Lex->comment= $3;
Lex->ident= $6;
}
;
check_view_or_table: check_view_or_table:
table_or_tables table_list opt_mi_check_type table_or_tables table_list opt_mi_check_type
...@@ -17641,19 +17656,21 @@ subselect_end: ...@@ -17641,19 +17656,21 @@ subselect_end:
lex->current_select = lex->current_select->return_after_parsing(); lex->current_select = lex->current_select->return_after_parsing();
lex->nest_level--; lex->nest_level--;
lex->current_select->n_child_sum_items += child->n_sum_items; lex->current_select->n_child_sum_items += child->n_sum_items;
/*
A subselect can add fields to an outer select. Reserve space for
them.
*/
lex->current_select->select_n_where_fields+=
child->select_n_where_fields;
/* /*
Aggregate functions in having clause may add fields to an outer A subquery (and all the subsequent query blocks in a UNION) can
select. Count them also. add columns to an outer query block. Reserve space for them.
Aggregate functions in having clause can also add fields to an
outer select.
*/ */
lex->current_select->select_n_having_items+= for (SELECT_LEX *temp= child->master_unit()->first_select();
child->select_n_having_items; temp != NULL; temp= temp->next_select())
{
lex->current_select->select_n_where_fields+=
temp->select_n_where_fields;
lex->current_select->select_n_having_items+=
temp->select_n_having_items;
}
} }
; ;
......
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