From a69cf6f07ee7286d4813ef5c602d5b79b39d3028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 23 Sep 2022 13:40:42 +0300 Subject: MDEV-29613 Improve WITH_DBUG_TRACE=OFF In commit 28325b08633372cc343dfcbc41fe252020cf6e6e a compile-time option was introduced to disable the macros DBUG_ENTER and DBUG_RETURN or DBUG_VOID_RETURN. The parameter name WITH_DBUG_TRACE would hint that it also covers DBUG_PRINT statements. Let us do that: WITH_DBUG_TRACE=OFF shall disable DBUG_PRINT() as well. A few InnoDB recovery tests used to check that some output from DBUG_PRINT("ib_log", ...) is present. We can live without those checks. Reviewed by: Vladislav Vaintroub --- sql/sql_binlog.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'sql/sql_binlog.cc') diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index f1326d97a21..9961cf6e137 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -41,14 +41,13 @@ static int check_event_type(int type, Relay_log_info *rli) */ if (fd_event && fd_event->event_type_permutation) { - IF_DBUG({ - int new_type= fd_event->event_type_permutation[type]; - DBUG_PRINT("info", - ("converting event type %d to %d (%s)", - type, new_type, - Log_event::get_type_str((Log_event_type)new_type))); - }, - (void)0); +#ifdef DBUG_TRACE + int new_type= fd_event->event_type_permutation[type]; + DBUG_PRINT("info", + ("converting event type %d to %d (%s)", + type, new_type, + Log_event::get_type_str((Log_event_type)new_type))); +#endif type= fd_event->event_type_permutation[type]; } -- cgit v1.2.1