summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy17
1 files changed, 13 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d07234ff2bd..258283d113e 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1092,7 +1092,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
key_alg opt_btree_or_rtree
%type <string_list>
- key_usage_list using_list
+ key_usage_list key_usage_list_inner using_list
%type <key_part>
key_part
@@ -5899,6 +5899,10 @@ opt_outer:
/* empty */ {}
| OUTER {};
+opt_for_join:
+ /* empty */
+ | FOR_SYM JOIN_SYM;
+
opt_key_definition:
/* empty */ {}
| USE_SYM key_usage_list
@@ -5914,15 +5918,20 @@ opt_key_definition:
sel->use_index_ptr= &sel->use_index;
sel->table_join_options|= TL_OPTION_FORCE_INDEX;
}
- | IGNORE_SYM key_usage_list
+ | IGNORE_SYM key_or_index opt_for_join key_usage_list_inner
{
SELECT_LEX *sel= Select;
- sel->ignore_index= *$2;
+ sel->ignore_index= *$4;
sel->ignore_index_ptr= &sel->ignore_index;
};
key_usage_list:
- key_or_index { Select->interval_list.empty(); }
+ key_or_index key_usage_list_inner
+ { $$= $2; }
+ ;
+
+key_usage_list_inner:
+ { Select->interval_list.empty(); }
'(' key_list_or_empty ')'
{ $$= &Select->interval_list; }
;