Commit f967c128 authored by unknown's avatar unknown

Got rid of the (previously) intentional SELECT/UNION reduce/reduce conflict.

There should be no more reduce/reduce conflicts in sql_yacc.yy from now on!


sql/sql_yacc.yy:
  Got rid of the (previously) intentional SELECT/UNION reduce/reduce conflict
  (in the optional_order_or_limit clause).
parent 5a3eb084
...@@ -2682,7 +2682,11 @@ order_dir: ...@@ -2682,7 +2682,11 @@ order_dir:
opt_limit_clause: opt_limit_clause:
/* empty */ {} /* empty */ {}
| LIMIT | limit_clause {}
;
limit_clause:
LIMIT
{ {
LEX *lex= Lex; LEX *lex= Lex;
if (lex->current_select->linkage != GLOBAL_OPTIONS_TYPE && if (lex->current_select->linkage != GLOBAL_OPTIONS_TYPE &&
...@@ -4380,10 +4384,7 @@ union_opt: ...@@ -4380,10 +4384,7 @@ union_opt:
; ;
optional_order_or_limit: optional_order_or_limit:
/* empty /* Empty */ {}
intentional reduce/reduce conflict here !!!
{ code } below should not be executed
when neither ORDER BY nor LIMIT are used */ {}
| |
{ {
LEX *lex=Lex; LEX *lex=Lex;
...@@ -4399,7 +4400,13 @@ optional_order_or_limit: ...@@ -4399,7 +4400,13 @@ optional_order_or_limit:
lex->current_select->select_limit= lex->current_select->select_limit=
lex->thd->variables.select_limit; lex->thd->variables.select_limit;
} }
opt_order_clause opt_limit_clause order_or_limit
;
order_or_limit:
order_clause opt_limit_clause
|
limit_clause
; ;
union_option: union_option:
......
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