summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc2
-rw-r--r--sql/log.cc8
-rw-r--r--sql/log_event.cc3
-rw-r--r--sql/mdl.cc2
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/net_serv.cc4
-rw-r--r--sql/rpl_parallel.cc12
-rw-r--r--sql/service_wsrep.cc4
-rw-r--r--sql/slave.cc4
-rw-r--r--sql/sql_parse.cc2
-rw-r--r--sql/sql_repl.cc6
-rw-r--r--sql/sql_table.cc4
-rw-r--r--sql/sql_trigger.cc6
-rw-r--r--sql/wsrep_high_priority_service.cc8
-rw-r--r--sql/wsrep_server_service.cc2
-rw-r--r--sql/wsrep_sst.cc2
-rw-r--r--sql/wsrep_thd.cc2
17 files changed, 63 insertions, 10 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index dddb93271c0..f4596803c2d 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -4508,10 +4508,12 @@ longlong Item_func_sleep::val_int()
mysql_cond_destroy(&cond);
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sleep_inject_query_done_debug_sync", {
debug_sync_set_action
(thd, STRING_WITH_LEN("dispatch_command_end SIGNAL query_done"));
};);
+#endif
return MY_TEST(!error); // Return 1 killed
}
diff --git a/sql/log.cc b/sql/log.cc
index 1ddb3c412ff..873218e8e32 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB Corporation.
+ Copyright (c) 2009, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -8012,10 +8012,12 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader");
{
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("inject_binlog_commit_before_get_LOCK_log",
DBUG_ASSERT(!debug_sync_set_action(leader->thd, STRING_WITH_LEN
("commit_before_get_LOCK_log SIGNAL waiting WAIT_FOR cont TIMEOUT 1")));
);
+#endif
/*
Lock the LOCK_log(), and once we get it, collect any additional writes
that queued up while we were waiting.
@@ -10142,6 +10144,7 @@ binlog_background_thread(void *arg __attribute__((unused)))
mysql_mutex_unlock(&mysql_bin_log.LOCK_binlog_background_thread);
/* Process any incoming commit_checkpoint_notify() calls. */
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("inject_binlog_background_thread_before_mark_xid_done",
DBUG_ASSERT(!debug_sync_set_action(
thd,
@@ -10150,6 +10153,7 @@ binlog_background_thread(void *arg __attribute__((unused)))
"WAIT_FOR something_that_will_never_happen "
"TIMEOUT 2")));
);
+#endif
while (queue)
{
long count= queue->notify_count;
@@ -10164,11 +10168,13 @@ binlog_background_thread(void *arg __attribute__((unused)))
mysql_bin_log.mark_xid_done(queue->binlog_id, true);
queue= next;
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("binlog_background_checkpoint_processed",
DBUG_ASSERT(!debug_sync_set_action(
thd,
STRING_WITH_LEN("now SIGNAL binlog_background_checkpoint_processed")));
);
+#endif
}
if (stop)
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 914a4595b62..0cb8667c8b0 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -11384,12 +11384,13 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
/* A small test to verify that objects have consistent types */
DBUG_ASSERT(sizeof(thd->variables.option_bits) == sizeof(OPTION_RELAXED_UNIQUE_CHECKS));
-
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rows_log_event_before_open_table",
{
const char action[] = "now SIGNAL before_open_table WAIT_FOR go_ahead_sql";
DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(action)));
};);
+#endif
/*
Trigger's procedures work with global table list. So we have to add
diff --git a/sql/mdl.cc b/sql/mdl.cc
index 1a4d4c24d31..3b553c5ce37 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -1168,6 +1168,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
wait_result != ETIMEDOUT && wait_result != ETIME)
{
#ifdef WITH_WSREP
+# ifdef ENABLED_DEBUG_SYNC
// Allow tests to block the applier thread using the DBUG facilities
DBUG_EXECUTE_IF("sync.wsrep_before_mdl_wait",
{
@@ -1177,6 +1178,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
DBUG_ASSERT(!debug_sync_set_action((owner->get_thd()),
STRING_WITH_LEN(act)));
};);
+# endif
if (WSREP_ON && wsrep_thd_is_BF(owner->get_thd(), false))
{
wait_result= mysql_cond_wait(&m_COND_wait_status, &m_LOCK_wait_status);
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 4d22dde9f62..d86875ecaea 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1676,6 +1676,7 @@ void kill_mysql(THD *thd)
DBUG_EXECUTE_IF("mysql_admin_shutdown_wait_for_slaves",
thd->lex->is_shutdown_wait_for_slaves= true;);
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
{
DBUG_ASSERT(binlog_dump_thread_count == 3);
@@ -1685,6 +1686,7 @@ void kill_mysql(THD *thd)
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
+#endif
if (thd->lex->is_shutdown_wait_for_slaves)
shutdown_wait_for_slaves= true;
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index b324f4a362f..c52083f8c2a 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
- Copyright (c) 2012, 2020, MariaDB Corporation.
+ Copyright (c) 2012, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -490,6 +490,7 @@ net_write_command(NET *net,uchar command,
DBUG_ENTER("net_write_command");
DBUG_PRINT("enter",("length: %lu", (ulong) len));
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_error_on_packet_write",
{
if (command == COM_BINLOG_DUMP)
@@ -501,6 +502,7 @@ net_write_command(NET *net,uchar command,
DBUG_RETURN(true);
}
};);
+#endif
MYSQL_NET_WRITE_START(length);
buff[4]=command; /* For first packet */
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 35901cb5263..2c431ccc12d 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -247,6 +247,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
entry->stop_on_error_sub_id == (uint64)ULONGLONG_MAX)
entry->stop_on_error_sub_id= sub_id;
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("hold_worker_on_schedule", {
if (entry->stop_on_error_sub_id < (uint64)ULONGLONG_MAX)
{
@@ -261,6 +262,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
STRING_WITH_LEN("now WAIT_FOR proceed_by_1000"));
}
});
+#endif
if (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING)
wait_for_pending_deadlock_kill(thd, rgi);
@@ -772,6 +774,7 @@ do_retry:
rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED;
thd->set_killed(KILL_CONNECTION);
});
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", {
if (rgi->current_gtid.seq_no == 1001) {
debug_sync_set_action(thd,
@@ -779,6 +782,7 @@ do_retry:
}
DEBUG_SYNC(thd, "rpl_parallel_simulate_wait_at_retry");
});
+#endif
rgi->cleanup_context(thd, 1);
wait_for_pending_deadlock_kill(thd, rgi);
@@ -1189,6 +1193,7 @@ handle_rpl_parallel_thread(void *arg)
bool did_enter_cond= false;
PSI_stage_info old_stage;
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("hold_worker_on_schedule", {
if (rgi->current_gtid.domain_id == 0 &&
rgi->current_gtid.seq_no == 100) {
@@ -1203,6 +1208,7 @@ handle_rpl_parallel_thread(void *arg)
STRING_WITH_LEN("now SIGNAL scheduled_gtid_0_x_100"));
}
});
+#endif
if(unlikely(thd->wait_for_commit_ptr) && group_rgi != NULL)
{
@@ -2171,11 +2177,13 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread,
did_enter_cond, old_stage);
my_error(ER_CONNECTION_KILLED, MYF(0));
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
{
debug_sync_set_action(rli->sql_driver_thd,
STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
};);
+#endif
slave_output_error_info(rgi, rli->sql_driver_thd);
return NULL;
}
@@ -2193,11 +2201,13 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
Because debug_sync changes the thd->mysys_var->current_mutex,
and this can cause THD::awake to use the wrong mutex.
*/
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
{
debug_sync_set_action(rli->sql_driver_thd,
STRING_WITH_LEN("now SIGNAL wait_queue_ready"));
};);
+#endif
rli->sql_driver_thd->ENTER_COND(&thr->COND_rpl_thread_queue,
&thr->LOCK_rpl_thread,
&stage_waiting_for_room_in_worker_thread,
@@ -2352,11 +2362,13 @@ rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli)
}
}
}
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("rpl_parallel_wait_for_done_trigger",
{
debug_sync_set_action(thd,
STRING_WITH_LEN("now SIGNAL wait_for_done_waiting"));
};);
+#endif
for (i= 0; i < domain_hash.records; ++i)
{
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc
index fd2a5c301f2..291d8dfbef8 100644
--- a/sql/service_wsrep.cc
+++ b/sql/service_wsrep.cc
@@ -227,7 +227,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd,
{
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
-
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.before_wsrep_thd_abort",
{
const char act[]=
@@ -237,7 +237,7 @@ extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd,
DBUG_ASSERT(!debug_sync_set_action(bf_thd,
STRING_WITH_LEN(act)));
};);
-
+#endif
my_bool ret= wsrep_bf_abort(bf_thd, victim_thd);
/*
Send awake signal if victim was BF aborted or does not
diff --git a/sql/slave.cc b/sql/slave.cc
index d906066204e..c9d5c9ca3be 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3797,12 +3797,14 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi,
Relay_log_info* rli= rgi->rli;
DBUG_ENTER("apply_event_and_update_pos_apply");
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("inject_slave_sql_before_apply_event",
{
DBUG_ASSERT(!debug_sync_set_action
(thd, STRING_WITH_LEN("now WAIT_FOR continue")));
DBUG_SET_INITIAL("-d,inject_slave_sql_before_apply_event");
};);
+#endif
if (reason == Log_event::EVENT_SKIP_NOT)
exec_res= ev->apply_event(rgi);
@@ -4388,6 +4390,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
#ifdef WITH_WSREP
wsrep_after_statement(thd);
#endif /* WITH_WSREP */
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF(
"pause_sql_thread_on_fde",
if (ev && typ == FORMAT_DESCRIPTION_EVENT) {
@@ -4396,6 +4399,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
STRING_WITH_LEN(
"now SIGNAL paused_on_fde WAIT_FOR sql_thread_continue")));
});
+#endif
DBUG_RETURN(exec_res);
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3f654777605..a039090da34 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7837,6 +7837,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
thd->lex->sql_command != SQLCOM_SELECT &&
thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit)
{
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_retry_autocommit",
{
const char act[]=
@@ -7845,6 +7846,7 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
"WAIT_FOR wsrep_retry_autocommit_continue";
DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act)));
});
+#endif
WSREP_DEBUG("wsrep retrying AC query: %lu %s",
thd->wsrep_retry_counter, wsrep_thd_query(thd));
wsrep_prepare_for_autocommit_retry(thd, rawbuf, length, parser_state);
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 94cbc6be614..d59bfbdb839 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2008, 2020, MariaDB Corporation
+ Copyright (c) 2008, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2865,6 +2865,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
info->error= ER_UNKNOWN_ERROR;
goto err;
}
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
{
const char act[]=
@@ -2873,6 +2874,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
+#endif
/*
heartbeat_period from @master_heartbeat_period user variable
@@ -2962,12 +2964,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
if (should_stop(info))
break;
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("wait_after_binlog_EOF",
{
const char act[]= "now wait_for signal.rotate_finished";
DBUG_ASSERT(!debug_sync_set_action(current_thd,
STRING_WITH_LEN(act)));
};);
+#endif
THD_STAGE_INFO(thd,
stage_finished_reading_one_binlog_switching_to_next_binlog);
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index a5fa36ffde6..f29fecd2744 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2115,10 +2115,12 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, bool if_exists,
}
}
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("ib_purge_virtual_mdev_16222_1",
DBUG_ASSERT(!debug_sync_set_action(
thd,
STRING_WITH_LEN("now SIGNAL drop_started"))););
+#endif
/* mark for close and remove all cached entries */
thd->push_internal_handler(&err_handler);
@@ -9654,7 +9656,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
DEBUG_SYNC(thd, "alter_opened_table");
-#ifdef WITH_WSREP
+#if defined WITH_WSREP && defined ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.alter_opened_table",
{
const char act[]=
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index fe10adb0417..77c7b60c233 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2004, 2012, Oracle and/or its affiliates.
- Copyright (c) 2010, 2018, MariaDB
+ Copyright (c) 2010, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -596,7 +596,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
goto end;
}
-#ifdef WITH_WSREP
+#if defined WITH_WSREP && defined ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.mdev_20225",
{
const char act[]=
@@ -605,7 +605,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
-#endif /* WITH_WSREP */
+#endif /* WITH_WSREP && ENABLED_DEBUG_SYNC */
result= (create ?
table->triggers->create_trigger(thd, tables, &stmt_query):
diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc
index e45bcf3e5ce..700ac599cee 100644
--- a/sql/wsrep_high_priority_service.cc
+++ b/sql/wsrep_high_priority_service.cc
@@ -381,6 +381,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta,
WSREP_DEBUG("Wsrep_high_priority_service::apply_toi: %lld",
client_state.toi_meta().seqno().get());
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_apply_toi",
{
const char act[]=
@@ -390,6 +391,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
+#endif
int ret= wsrep_apply_events(thd, m_rli, data.data(), data.size());
if (ret != 0 || thd->wsrep_has_ignored_error)
@@ -439,6 +441,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_
DBUG_PRINT("info",
("Wsrep_high_priority_service::log_dummy_write_set: seqno=%lld",
ws_meta.seqno().get()));
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_log_dummy_write_set",
{
const char act[]=
@@ -447,6 +450,7 @@ int Wsrep_high_priority_service::log_dummy_write_set(const wsrep::ws_handle& ws_
DBUG_ASSERT(!debug_sync_set_action(m_thd,
STRING_WITH_LEN(act)));
};);
+#endif
if (ws_meta.ordered())
{
@@ -536,6 +540,7 @@ int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta& ws_meta,
/* moved dbug sync point here, after possible THD switch for SR transactions
has ben done
*/
+#ifdef ENABLED_DEBUG_SYNC
/* Allow tests to block the applier thread using the DBUG facilities */
DBUG_EXECUTE_IF("sync.wsrep_apply_cb",
{
@@ -546,6 +551,7 @@ int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
+#endif
wsrep_setup_uk_and_fk_checks(thd);
@@ -694,6 +700,7 @@ int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(thd->wsrep_trx().active());
DBUG_ASSERT(thd->wsrep_trx().state() == wsrep::transaction::s_replaying);
+#ifdef ENABLED_DEBUG_SYNC
/* Allow tests to block the replayer thread using the DBUG facilities */
DBUG_EXECUTE_IF("sync.wsrep_replay_cb",
{
@@ -704,6 +711,7 @@ int Wsrep_replayer_service::apply_write_set(const wsrep::ws_meta& ws_meta,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
+#endif
wsrep_setup_uk_and_fk_checks(thd);
diff --git a/sql/wsrep_server_service.cc b/sql/wsrep_server_service.cc
index 41778ef9420..cf6f76cf02e 100644
--- a/sql/wsrep_server_service.cc
+++ b/sql/wsrep_server_service.cc
@@ -386,6 +386,7 @@ int Wsrep_server_service::wait_committing_transactions(int timeout)
void Wsrep_server_service::debug_sync(const char* sync_point)
{
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF(sync_point, {
std::stringstream dbug_action;
dbug_action << "now "
@@ -396,4 +397,5 @@ void Wsrep_server_service::debug_sync(const char* sync_point)
action.c_str(),
action.length()));
};);
+#endif
}
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index a8642189bff..ddd5b5945b4 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -1736,6 +1736,7 @@ wait_signal:
WSREP_INFO("Donor state reached");
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_donor_state",
{
const char act[]=
@@ -1745,6 +1746,7 @@ wait_signal:
assert(!debug_sync_set_action(thd.ptr,
STRING_WITH_LEN(act)));
};);
+#endif
goto wait_signal;
}
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 3a9384c7428..8853ea6a499 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -348,6 +348,7 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd)
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_data);
mysql_mutex_assert_owner(&victim_thd->LOCK_thd_kill);
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sync.wsrep_bf_abort",
{
const char act[]=
@@ -357,6 +358,7 @@ bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd)
DBUG_ASSERT(!debug_sync_set_action(bf_thd,
STRING_WITH_LEN(act)));
};);
+#endif
if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active())
{