Skip to content
Permalink
Browse files
MDEV-13073. This patch replaces semisync's native function_enter,exit
and its custom trace faciltiy with standard DBUG_ based equivalents.
  • Loading branch information
andrelkin authored and montywi committed Dec 18, 2017
1 parent c0ea305 commit 6a84e34
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 158 deletions.
@@ -35,32 +35,6 @@ class Trace {

unsigned long trace_level_; /* the level for tracing */

inline void function_enter(const char *func_name)
{
if (trace_level_ & kTraceFunction)
sql_print_information("---> %s enter", func_name);
}
inline int function_exit(const char *func_name, int exit_code)
{
if (trace_level_ & kTraceFunction)
sql_print_information("<--- %s exit (%d)", func_name, exit_code);
return exit_code;
}

inline bool function_exit(const char *func_name, bool exit_code)
{
if (trace_level_ & kTraceFunction)
sql_print_information("<--- %s exit (%s)", func_name,
exit_code ? "True" : "False");
return exit_code;
}

inline void function_exit(const char *func_name)
{
if (trace_level_ & kTraceFunction)
sql_print_information("<--- %s exit", func_name);
}

Trace()
:trace_level_(0L)
{}

0 comments on commit 6a84e34

Please sign in to comment.