Commit ec38c7e6 authored by Monty's avatar Monty

MDEV-10219 rpl.rpl_parallel_temptable failed in buildbot: Assertion `!table ||...

MDEV-10219 rpl.rpl_parallel_temptable failed in buildbot: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed

Problem was that table->in_use was not properly set when dropping a temporary for the slave.
parent 838205f0
......@@ -635,6 +635,12 @@ bool THD::drop_temporary_table(TABLE *table,
*/
while ((tab= share->all_tmp_tables.pop_front()))
{
/*
We need to set the THD as it may be different in case of
parallel replication
*/
tab->in_use= this;
free_temporary_table(tab);
}
......@@ -1188,6 +1194,8 @@ bool THD::use_temporary_table(TABLE *table, TABLE **out_table)
DBUG_ENTER("THD::use_temporary_table");
*out_table= table;
/* The following can happen if find_temporary_table() returns NULL */
if (!table)
DBUG_RETURN(false);
......@@ -1215,10 +1223,7 @@ bool THD::use_temporary_table(TABLE *table, TABLE **out_table)
We need to set the THD as it may be different in case of
parallel replication
*/
if (table->in_use != this)
{
table->in_use= this;
}
DBUG_RETURN(false);
}
......
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