diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3344abfbb2d..1270aab18ae 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -135,7 +135,6 @@ void lex_start(THD *thd, uchar *buf,uint length) lex->select_lex.link_next= lex->select_lex.slave= lex->select_lex.next= 0; lex->select_lex.link_prev= (st_select_lex_node**)&(lex->all_selects_list); lex->select_lex.options= 0; - lex->select_lex.options2= 0; lex->select_lex.init_order(); lex->select_lex.group_list.empty(); lex->describe= 0; @@ -1065,7 +1064,6 @@ int yylex(void *arg, void *yythd) void st_select_lex_node::init_query() { options= 0; - options2= 0; linkage= UNSPECIFIED_TYPE; no_error= no_table_names_allowed= 0; uncacheable= 0; @@ -1129,7 +1127,6 @@ void st_select_lex::init_select() table_join_options= 0; in_sum_expr= with_wild= 0; options= 0; - options2= 0; braces= 0; when_list.empty(); expr_list.empty(); diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 059d2255b36..91887a38a29 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -297,7 +297,6 @@ protected: public: uint32 options; - uint32 options2; /* result of this query can't be cached, bit field, can be : UNCACHEABLE_DEPENDENT diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 642dd6d02b0..62ba61961a8 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4029,7 +4029,7 @@ select_options: /* empty*/ | select_option_list { - if (Select->options & SELECT_DISTINCT && Select->options2 & SELECT_ALL) + if (Select->options & SELECT_DISTINCT && Select->options & SELECT_ALL) { my_error(ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT"); YYABORT; @@ -4069,7 +4069,7 @@ select_option: { Lex->select_lex.options|= OPTION_TO_QUERY_CACHE; } - | ALL { Select->options2|= SELECT_ALL; } + | ALL { Select->options|= SELECT_ALL; } ; select_lock_type: