diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index e75433eb417..c52005e7683 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -698,7 +698,6 @@ void LEX::start(THD *thd_arg) describe= 0; analyze_stmt= 0; explain_json= false; - subqueries= FALSE; context_analysis_only= 0; derived_tables= 0; safe_to_cache_query= 1; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 926b09ed3a7..84d156a4843 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -3034,7 +3034,7 @@ public: enum enum_yes_no_unknown tx_chain, tx_release; bool safe_to_cache_query; - bool subqueries, ignore; + bool ignore; st_parsing_options parsing_options; Alter_info alter_info; /* @@ -3053,7 +3053,6 @@ public: sp_name *spname; bool sp_lex_in_use; // Keep track on lex usage in SPs for error handling bool all_privileges; - bool proxy_priv; sp_pcontext *spcont; @@ -4140,18 +4139,6 @@ public: */ }; -/** - Input parameters to the parser. -*/ -struct Parser_input -{ - bool m_compute_digest; - - Parser_input() - : m_compute_digest(false) - {} -}; - /** Internal state of the parser. The complete state consist of: @@ -4179,7 +4166,6 @@ public: ~Parser_state() {} - Parser_input m_input; Lex_input_stream m_lip; Yacc_state m_yacc; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b8ed887b52d..7cc950f7d51 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7733,7 +7733,6 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex) if (move_down) { SELECT_LEX_UNIT *unit; - lex->subqueries= TRUE; /* first select_lex of subselect or derived table */ if (!(unit= new (thd->mem_root) SELECT_LEX_UNIT())) DBUG_RETURN(1); @@ -10079,8 +10078,7 @@ bool parse_sql(THD *thd, Parser_state *parser_state, /* Start Digest */ parser_state->m_digest_psi= MYSQL_DIGEST_START(thd->m_statement_psi); - if (parser_state->m_input.m_compute_digest || - (parser_state->m_digest_psi != NULL)) + if (parser_state->m_digest_psi != NULL) { /* If either: diff --git a/sql/sql_view.cc b/sql/sql_view.cc index c2cb5902371..50416940960 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1712,7 +1712,6 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table, view_select->linkage= DERIVED_TABLE_TYPE; table->updatable= 0; table->effective_with_check= VIEW_CHECK_NONE; - old_lex->subqueries= TRUE; table->derived= &lex->unit; }