mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
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.
This commit is contained in:
parent
8b5dddbc00
commit
301a31fddf
1 changed files with 5 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue