From eb2302ec78e86a1605e7ed47a83a2b7081b68eb3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 24 Mar 2014 11:22:16 +0100 Subject: [PATCH] MDEV-5825: Assertion `! is_set() || m_can_overwrite_status' fails in Diagnostics_area::set_error_status on executing rpl.rpl_parallel test In parallel replication, there was an error case where we could call my_error() in-between events. This causes the assertion, as the previous event has reported ok status, but the following event has not yet reset the diagnostics area. This happened when a worker thread detects that the SQL driver thread is aborting, and when it gets an error from a prior commit at the same time in wait_for_prior_commit(). Since this is already an error case, the code should be using unregister_wait_for_prior_commit() instead of wait_for_prior_commit(). But unregister is already done a bit later (from finish_event_group()), so just removing the redundant call to wait_for_prior_commit() fixes the issue. --- sql/rpl_parallel.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 5bc22d7304e..9c4c819c022 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -576,7 +576,6 @@ handle_rpl_parallel_thread(void *arg) half-processed event group. */ mysql_mutex_unlock(&rpt->LOCK_rpl_thread); - thd->wait_for_prior_commit(); signal_error_to_sql_driver_thread(thd, group_rgi, 1); finish_event_group(thd, group_rgi->gtid_sub_id, group_rgi->parallel_entry, group_rgi);