summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-09-23 17:37:52 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-09-23 17:37:52 +0300
commit3c92050d1c907cc548e848d0ab2891a06681ad92 (patch)
tree27ea08091389453521b52f15c6dffe3d70ecb68b /sql/slave.cc
parent13eae1885e739a234cebd592f891e87f387784c6 (diff)
downloadmariadb-git-3c92050d1c907cc548e848d0ab2891a06681ad92.tar.gz
Fix build without either ENABLED_DEBUG_SYNC or DBUG_OFF
There are separate flags DBUG_OFF for disabling the DBUG facility and ENABLED_DEBUG_SYNC for enabling the DEBUG_SYNC facility. Let us allow debug builds without DEBUG_SYNC. Note: For CMAKE_BUILD_TYPE=Debug, CMakeLists.txt will continue to define ENABLED_DEBUG_SYNC.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc4
1 files changed, 4 insertions, 0 deletions
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);
}