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 --- mysys/mf_keycache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mysys') diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index f09739ae8af..568064b2a7c 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2017, MariaDB Corporation. + Copyright (c) 2017, 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 @@ -376,7 +376,7 @@ static void keycache_debug_print(const char *fmt,...); #define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a) #endif /* defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG) */ -#if defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) +#if defined(KEYCACHE_DEBUG) || defined(DBUG_TRACE) static long keycache_thread_id; #define KEYCACHE_THREAD_TRACE(l) \ KEYCACHE_DBUG_PRINT(l,("|thread %ld",keycache_thread_id)) @@ -392,7 +392,7 @@ static long keycache_thread_id; #define KEYCACHE_THREAD_TRACE_BEGIN(l) #define KEYCACHE_THREAD_TRACE_END(l) #define KEYCACHE_THREAD_TRACE(l) -#endif /* defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) */ +#endif /* defined(KEYCACHE_DEBUG) || defined(DBUG_TRACE) */ #define BLOCK_NUMBER(b) \ ((uint) (((char*)(b)-(char *) keycache->block_root)/sizeof(BLOCK_LINK))) -- cgit v1.2.1