diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-02-19 19:11:40 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-02-19 19:11:40 +0100 |
commit | c65daf02f0d3559596c3274daa642727f8b905e8 (patch) | |
tree | fbd301fa02058fdebd41fd8cc7ae79dca4f9d263 | |
parent | 00906719fe3c1a591ac3ffc1203992f10555b566 (diff) | |
download | mariadb-git-c65daf02f0d3559596c3274daa642727f8b905e8.tar.gz |
make compatible parser in sync with main one
-rw-r--r-- | sql/sql_yacc_ora.yy | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index b8b2a862469..f7aa1c937c6 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -1538,6 +1538,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); set_assign sf_tail_standalone sp_tail_standalone + opt_constraint_no_id END_OF_INPUT %type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt @@ -6564,6 +6565,11 @@ check_constraint: } ; +opt_constraint_no_id: + /* Empty */ {} + | CONSTRAINT {} + ; + opt_constraint: /* empty */ { $$= null_clex_str; } | constraint { $$= $1; } @@ -8314,7 +8320,7 @@ alter_list_item: lex->alter_info.drop_list.push_back(ad, thd->mem_root); 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; Alter_drop *ad= (new (thd->mem_root) @@ -8824,8 +8830,17 @@ binlog_base64_event: { Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT; 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: table_or_tables table_list opt_mi_check_type @@ -17641,19 +17656,21 @@ subselect_end: lex->current_select = lex->current_select->return_after_parsing(); lex->nest_level--; 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 - select. Count them also. + A subquery (and all the subsequent query blocks in a UNION) can + 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+= - child->select_n_having_items; + for (SELECT_LEX *temp= child->master_unit()->first_select(); + 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; + } } ; |