revision-id: 4b89d83ddfa4ee93d5c563a9a5a33b439f1c19ed (mariadb-10.1.32-82-g4b89d83ddfa) parent(s): 2e9fdf1d70da2c27d5a78837a306f91712781f03 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2018-05-07 18:02:43 +0200 message: fix --- sql/sp_head.cc | 2 +- sql/sql_class.cc | 2 +- sql/sql_lex.cc | 2 +- sql/sql_trigger.cc | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 536f6900866..0d24ed04eae 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2205,7 +2205,7 @@ sp_head::reset_lex(THD *thd) if (sublex == 0) DBUG_RETURN(TRUE); - thd->lex= thd->stmt_lex= sublex; + thd->lex= sublex; (void)m_lex.push_front(oldlex); /* Reset most stuff. */ diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 2ab1cd3a61a..24140246b96 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -3654,7 +3654,7 @@ void Statement::set_statement(Statement *stmt) { id= stmt->id; mark_used_columns= stmt->mark_used_columns; - stmt_lex= lex= stmt->lex; + lex= stmt->lex; query_string= stmt->query_string; } diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 957365df51a..085ad1a4b3b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -661,8 +661,8 @@ void lex_start(THD *thd) lex->thd= lex->unit.thd= thd; + lex->stmt_lex= lex; // default, should be rewritten for VIEWs And CTEs DBUG_ASSERT(!lex->explain); - stmt_lex= this; lex->context_stack.empty(); lex->unit.init_query(); diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 2f291cc3756..293a4c17156 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1579,7 +1579,6 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db, } thd->reset_db(save_db.str, save_db.length); thd->lex= old_lex; - thd->stmt_lex= old_stmt_lex; thd->spcont= save_spcont; thd->variables.sql_mode= save_sql_mode;