Commit 18f160d9 authored by sjaakola's avatar sjaakola Committed by Nirbhay Choubey

refs codership/mysql-wsrep#233

- added dbug sync points for further mtr test for this issue
parent bf9572ba
......@@ -24,6 +24,7 @@
#include <mysql/psi/mysql_stage.h>
#ifdef WITH_WSREP
#include "debug_sync.h"
#include "wsrep_mysqld.h"
#include "wsrep_thd.h"
extern "C" my_thread_id wsrep_thd_thread_id(THD *thd);
......@@ -1445,6 +1446,15 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
wait_result != ETIMEDOUT && wait_result != ETIME)
{
#ifdef WITH_WSREP
// Allow tests to block the applier thread using the DBUG facilities
DBUG_EXECUTE_IF("sync.wsrep_before_mdl_wait",
{
const char act[]=
"now "
"wait_for signal.wsrep_before_mdl_wait";
DBUG_ASSERT(!debug_sync_set_action((owner->get_thd()),
STRING_WITH_LEN(act)));
};);
if (wsrep_thd_is_BF(owner->get_thd(), true))
{
wait_result= mysql_cond_wait(&m_COND_wait_status, &m_LOCK_wait_status);
......
......@@ -17357,6 +17357,15 @@ wsrep_innobase_kill_one_trx(
(thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void");
wsrep_thd_LOCK(thd);
DBUG_EXECUTE_IF("sync.wsrep_after_BF_victim_lock",
{
const char act[]=
"now "
"wait_for signal.wsrep_after_BF_victim_lock";
DBUG_ASSERT(!debug_sync_set_action(bf_thd,
STRING_WITH_LEN(act)));
};);
if (wsrep_thd_query_state(thd) == QUERY_EXITING) {
WSREP_DEBUG("kill trx EXITING for %lu", victim_trx->id);
......
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