From b8373d5c7f3bc25e6da42b3701dccae29a10147d Mon Sep 17 00:00:00 2001 From: Satya Bodapati Date: Fri, 7 Jun 2024 16:52:40 +0100 Subject: [PATCH] PXB-3034: Bring back UNIV_DEBUG on debug-sync-thread. This will be debug only option. Fix release build issues --- storage/innobase/include/xb0xb.h | 4 ++++ storage/innobase/xtrabackup/src/xtrabackup.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/storage/innobase/include/xb0xb.h b/storage/innobase/include/xb0xb.h index f881c0acac7c..0bfe7cb874c3 100644 --- a/storage/innobase/include/xb0xb.h +++ b/storage/innobase/include/xb0xb.h @@ -106,10 +106,14 @@ const std::string KEYRING_NOT_LOADED = @param[in] name sync point name */ void debug_sync_point(const char *name); +#ifdef UNIV_DEBUG /** Pause xtrabackup thread and wait for resume. Thread can be resumed by deleting the sync_point filename @param[in] name sync point name */ void debug_sync_thread(const char *name); +#else +#define debug_sync_thread(A) +#endif /* UNIV_DEBUG */ extern char *xtrabackup_debug_sync; diff --git a/storage/innobase/xtrabackup/src/xtrabackup.cc b/storage/innobase/xtrabackup/src/xtrabackup.cc index fa82f4ebec14..ebe2fa193ec2 100644 --- a/storage/innobase/xtrabackup/src/xtrabackup.cc +++ b/storage/innobase/xtrabackup/src/xtrabackup.cc @@ -365,7 +365,9 @@ it every INNOBASE_WAKE_INTERVAL'th step. */ ulong innobase_active_counter = 0; char *xtrabackup_debug_sync = NULL; +#ifdef UNIV_DEBUG char *xtrabackup_debug_sync_thread = NULL; +#endif /* UNIV_DEBUG */ static std::string debug_sync_file_content; static const char *dbug_setting = nullptr; @@ -1762,6 +1764,7 @@ void debug_sync_point(const char *name) { #endif } +#ifdef UNIV_DEBUG void debug_sync_thread(const char *name) { #ifndef __WIN__ FILE *fp; @@ -1803,6 +1806,7 @@ void debug_sync_thread(const char *name) { #endif } +#endif /* UNIV_DEBUG */ static const char *xb_client_default_groups[] = {"xtrabackup", "client", 0, 0, 0};