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

Merge bb-10.2-ext into 10.3

This commit is contained in:
Marko Mäkelä
2018-02-15 10:22:03 +02:00
583 changed files with 17039 additions and 5592 deletions

View File

@ -7514,7 +7514,12 @@ void THD::reset_for_next_command(bool do_clear_error)
clear_error(1);
free_list= 0;
select_number= 1;
/*
We also assign stmt_lex in lex_start(), but during bootstrap this
code is executed first.
*/
stmt_lex= &main_lex; stmt_lex->current_select_number= 1;
DBUG_PRINT("info", ("Lex %p stmt_lex: %p", lex, stmt_lex));
/*
Those two lines below are theoretically unneeded as
THD::cleanup_after_query() should take care of this already.
@ -7564,10 +7569,8 @@ void THD::reset_for_next_command(bool do_clear_error)
thread_specific_used= FALSE;
if (opt_bin_log)
{
reset_dynamic(&user_var_events);
user_var_events_alloc= mem_root;
}
DBUG_ASSERT(user_var_events_alloc == &main_mem_root);
enable_slow_log= variables.sql_log_slow;
get_stmt_da()->reset_for_next_command();
rand_used= 0;
@ -7634,7 +7637,7 @@ mysql_new_select(LEX *lex, bool move_down, SELECT_LEX *select_lex)
{
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();