summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-09-23 13:40:42 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-09-23 13:40:42 +0300
commita69cf6f07ee7286d4813ef5c602d5b79b39d3028 (patch)
tree6068dad43fbda21245e341a6da0164fc7ef01bd1 /include
parentdb7e04ed3ab5d591a323443cb20c3a45792916b6 (diff)
downloadmariadb-git-a69cf6f07ee7286d4813ef5c602d5b79b39d3028.tar.gz
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
Diffstat (limited to 'include')
-rw-r--r--include/my_dbug.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 9ae482005b9..e69ee4f8ed5 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -74,6 +74,9 @@ extern int (*dbug_sanity)(void);
_db_stack_frame_.line= 0; \
} while(0)
+#define DBUG_PRINT(keyword,arglist) \
+ do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
+
#ifdef HAVE_ATTRIBUTE_CLEANUP
#define DBUG_ENTER(a) struct _db_stack_frame_ _db_stack_frame_ __attribute__((cleanup(_db_return_))); \
_db_enter_ (a,__FILE__,__LINE__,&_db_stack_frame_)
@@ -91,6 +94,7 @@ extern int (*dbug_sanity)(void);
#define DBUG_ENTER(a)
#define DBUG_RETURN(a1) return(a1)
#define DBUG_VOID_RETURN return
+#define DBUG_PRINT(keyword,arglist) do{} while(0)
#endif
#define DBUG_EXECUTE(keyword,a1) \
@@ -101,8 +105,6 @@ extern int (*dbug_sanity)(void);
(_db_keyword_(0,(keyword), 0) ? (a1) : (a2))
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
-#define DBUG_PRINT(keyword,arglist) \
- do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
#define DBUG_PUSH(a1) _db_push_ (a1)
#define DBUG_POP() _db_pop_ ()
#define DBUG_SET(a1) _db_set_ (a1)
@@ -164,6 +166,7 @@ extern void _db_suicide_(void);
#define DBUG_LEAVE
#define DBUG_RETURN(a1) do { return(a1); } while(0)
#define DBUG_VOID_RETURN do { return; } while(0)
+#define DBUG_PRINT(keyword, arglist) do { } while(0)
#define DBUG_EXECUTE(keyword,a1) do { } while(0)
#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0)
#define DBUG_EVALUATE(keyword,a1,a2) (a2)