mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29613 Improve WITH_DBUG_TRACE=OFF
In commit 28325b0863
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user