Skip to content

Commit a742f8e

Browse files
committed
Merge branch '10.2' of github.com:MariaDB/server into 10.2
2 parents 4a8d377 + 1f4f729 commit a742f8e

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

sql/sql_yacc.yy

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
19191919
%type <variable> internal_variable_name
19201920

19211921
%type <select_lex> subselect
1922-
get_select_lex query_term
1922+
get_select_lex
19231923
query_expression_body
19241924

19251925
%type <boolfunc2creator> comp_op
@@ -16378,24 +16378,33 @@ union_option:
1637816378
| ALL { $$=0; }
1637916379
;
1638016380

16381+
/*
16382+
Corresponds to the SQL Standard
16383+
<query specification> ::=
16384+
SELECT [ <set quantifier> ] <select list> <table expression>
16385+
16386+
Notes:
16387+
- We allow more options in addition to <set quantifier>
16388+
- <table expression> is optional in MariaDB
16389+
*/
16390+
query_specification:
16391+
SELECT_SYM select_init2_derived opt_table_expression
16392+
;
16393+
1638116394
query_term:
16382-
SELECT_SYM select_init2_derived
16383-
opt_table_expression
16395+
query_specification
1638416396
opt_order_clause
1638516397
opt_limit_clause
1638616398
opt_select_lock_type
16387-
{
16388-
$$= Lex->current_select->master_unit()->first_select();
16389-
}
1639016399
| '(' select_paren_derived ')'
1639116400
opt_union_order_or_limit
16392-
{
16393-
$$= Lex->current_select->master_unit()->first_select();
16394-
}
1639516401
;
1639616402

1639716403
query_expression_body:
1639816404
query_term
16405+
{
16406+
$$= Lex->current_select->master_unit()->first_select();
16407+
}
1639916408
| query_expression_body union_head_non_top query_term
1640016409
{
1640116410
Lex->pop_context();
@@ -16407,7 +16416,7 @@ query_expression_body:
1640716416
subselect:
1640816417
subselect_start opt_with_clause query_expression_body subselect_end
1640916418
{
16410-
$3->set_with_clause($2);
16419+
$3->set_with_clause($2);
1641116420
$$= $3;
1641216421
}
1641316422
;

0 commit comments

Comments
 (0)