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

Signed-off-by: Kristian Nielsen <kniel...@knielsen-hq.org>
---
 sql/rpl_parallel.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index e59c1de7a7c..553557638f6 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -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
     {
-- 
2.39.5

_______________________________________________
commits mailing list -- commits@lists.mariadb.org
To unsubscribe send an email to commits-le...@lists.mariadb.org

Reply via email to