Restore the THD state correctly in parallel replication

If both do_gco_wait() and do_ftwrl_wait() had to wait, the state was not restored correctly.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen 2024-11-28 10:24:28 +01:00
parent d959acbbf8
commit 7372ecc396

View file

@ -500,7 +500,8 @@ do_ftwrl_wait(rpl_group_info *rgi,
{
thd->set_time_for_next_stage();
thd->ENTER_COND(&entry->COND_parallel_entry, &entry->LOCK_parallel_entry,
&stage_waiting_for_ftwrl, old_stage);
&stage_waiting_for_ftwrl,
(*did_enter_cond ? nullptr : old_stage));
*did_enter_cond= true;
do
{