Commit 70113ee1 authored by Nirbhay Choubey's avatar Nirbhay Choubey

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.
parent 3f515a09
...@@ -4611,18 +4611,18 @@ a file name for --log-bin-index option", opt_binlog_index_name); ...@@ -4611,18 +4611,18 @@ 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
variables that allocates memory for this THD. altered during init_for_queries().
*/ */
THD *current_thd_saved= current_thd; unsigned int server_status_saved= tmp->server_status;
my_pthread_setspecific_ptr(THR_THD, tmp); ulonglong option_bits_saved= tmp->variables.option_bits;
/* /*
Also save/restore server_status and variables.option_bits and they Set THR_THD to temporarily point to this THD to register all the
get altered during init_for_queries(). variables that allocates memory for this THD.
*/ */
unsigned int server_status_saved= tmp->server_status; THD *current_thd_saved= current_thd;
ulonglong option_bits_saved= tmp->variables.option_bits; my_pthread_setspecific_ptr(THR_THD, tmp);
tmp->init_for_queries(); tmp->init_for_queries();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment