Commit 301a31fd authored by unknown's avatar unknown

WL#3072 Maria recovery

Minor change: decouple the writing of a recovery trace from
compilation with --with-debug; that writing happens if and only
if EXTRA_DEBUG. So one can enable (by defining EXTRA_DEBUG) a recovery trace
in a non-debug build.


storage/maria/ma_recovery.c:
  Small optimization. Decouple recovery trace from --with-debug.
parent 8b5dddbc
......@@ -123,13 +123,16 @@ static my_bool redo_phase_message_printed;
/** @brief Prints to a trace file if it is not NULL */
void tprint(FILE *trace_file, const char *format, ...)
ATTRIBUTE_FORMAT(printf, 2, 3);
void tprint(FILE *trace_file, const char *format, ...)
void tprint(FILE *trace_file __attribute__ ((unused)),
const char *format __attribute__ ((unused)), ...)
{
#ifdef EXTRA_DEBUG
va_list args;
va_start(args, format);
if (trace_file != NULL)
vfprintf(trace_file, format, args);
va_end(args);
#endif
}
#define ALERT_USER() DBUG_ASSERT(0)
......@@ -157,7 +160,7 @@ int maria_recover(void)
DBUG_ASSERT(!maria_in_recovery);
maria_in_recovery= TRUE;
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
#ifdef EXTRA_DEBUG
trace_file= fopen("maria_recovery.trace", "w");
#else
trace_file= NULL; /* no trace file for being fast */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment