Skip to content

Commit

Permalink
Merge branch '10.0-galera' into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirbhay Choubey committed Dec 23, 2015
2 parents 8efdfc8 + 89a2648 commit 000eba9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5224,18 +5224,18 @@ static int init_server_components()
if (tmp->wsrep_applier == true)
{
/*
Set THR_THD to temporally point to this THD to register all the
variables that allocates memory for this THD.
Save/restore server_status and variables.option_bits and they get
altered during init_for_queries().
*/
THD *current_thd_saved= current_thd;
set_current_thd(tmp);
unsigned int server_status_saved= tmp->server_status;
ulonglong option_bits_saved= tmp->variables.option_bits;

/*
Also save/restore server_status and variables.option_bits and they
get altered during init_for_queries().
Set THR_THD to temporarily point to this THD to register all the
variables that allocates memory for this THD.
*/
unsigned int server_status_saved= tmp->server_status;
ulonglong option_bits_saved= tmp->variables.option_bits;
THD *current_thd_saved= current_thd;
set_current_thd(tmp);

tmp->init_for_queries();

Expand Down
10 changes: 10 additions & 0 deletions sql/sql_reload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,16 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
}

#ifdef WITH_WSREP
if (thd && thd->wsrep_applier)
{
/*
In case of applier thread, do not wait for table share(s) to be
removed from table definition cache.
*/
options|= REFRESH_FAST;
}
#endif
if (close_cached_tables(thd, tables,
((options & REFRESH_FAST) ? FALSE : TRUE),
(thd ? thd->variables.lock_wait_timeout :
Expand Down

0 comments on commit 000eba9

Please sign in to comment.