1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge branch 'github/10.1' into 10.2

This commit is contained in:
Sergei Golubchik
2018-02-06 14:50:50 +01:00
466 changed files with 9366 additions and 3618 deletions

View File

@ -7433,7 +7433,12 @@ void THD::reset_for_next_command(bool do_clear_error)
clear_error(1);
thd->free_list= 0;
thd->select_number= 1;
/*
We also assign thd->stmt_lex in lex_start(), but during bootstrap this
code is executed first.
*/
thd->stmt_lex= &main_lex; thd->stmt_lex->current_select_number= 1;
DBUG_PRINT("info", ("Lex %p stmt_lex: %p", thd->lex, thd->stmt_lex));
/*
Those two lines below are theoretically unneeded as
THD::cleanup_after_query() should take care of this already.
@ -7550,7 +7555,7 @@ mysql_new_select(LEX *lex, bool move_down)
if (!(select_lex= new (thd->mem_root) SELECT_LEX()))
DBUG_RETURN(1);
select_lex->select_number= ++thd->select_number;
select_lex->select_number= ++thd->stmt_lex->current_select_number;
select_lex->parent_lex= lex; /* Used in init_query. */
select_lex->init_query();
select_lex->init_select();