mirror of
https://github.com/MariaDB/server.git
synced 2025-07-26 07:02:12 +03:00
MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
Addendum: Save thd's server_status & option_bits before setting the thread specific pointer.
This commit is contained in:
@ -4611,19 +4611,19 @@ a file name for --log-bin-index option", opt_binlog_index_name);
|
|||||||
if (tmp->wsrep_applier == true)
|
if (tmp->wsrep_applier == true)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Set THR_THD to temporally point to this THD to register all the
|
Save/restore server_status and variables.option_bits and they get
|
||||||
|
altered during init_for_queries().
|
||||||
|
*/
|
||||||
|
unsigned int server_status_saved= tmp->server_status;
|
||||||
|
ulonglong option_bits_saved= tmp->variables.option_bits;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Set THR_THD to temporarily point to this THD to register all the
|
||||||
variables that allocates memory for this THD.
|
variables that allocates memory for this THD.
|
||||||
*/
|
*/
|
||||||
THD *current_thd_saved= current_thd;
|
THD *current_thd_saved= current_thd;
|
||||||
my_pthread_setspecific_ptr(THR_THD, tmp);
|
my_pthread_setspecific_ptr(THR_THD, tmp);
|
||||||
|
|
||||||
/*
|
|
||||||
Also save/restore server_status and variables.option_bits and they
|
|
||||||
get altered during init_for_queries().
|
|
||||||
*/
|
|
||||||
unsigned int server_status_saved= tmp->server_status;
|
|
||||||
ulonglong option_bits_saved= tmp->variables.option_bits;
|
|
||||||
|
|
||||||
tmp->init_for_queries();
|
tmp->init_for_queries();
|
||||||
|
|
||||||
/* Restore current_thd. */
|
/* Restore current_thd. */
|
||||||
|
Reference in New Issue
Block a user