Commit 74e668ea authored by Monty's avatar Monty

Fixed warning for maria.maria-recovery2 about crashed table

The bug was a missing va_start in eprint() which caused a wrong table
name to be printed.
Patch backported from 10.3.
parent 22fd31c5
......@@ -59,11 +59,12 @@ void tprint(FILE *trace_file __attribute__ ((unused)),
va_list args;
#ifndef DBUG_OFF
{
char buff[1024], *end;
char buff[1024];
size_t length;
va_start(args, format);
vsnprintf(buff, sizeof(buff)-1, format, args);
if (*(end= strend(buff)) == '\n')
*end= 0; /* Don't print end \n */
length= my_vsnprintf(buff, sizeof(buff)-1, format, args);
if (length && buff[length-1] == '\n')
buff[length-1]= 0; /* Don't print end \n */
DBUG_PRINT("info", ("%s", buff));
va_end(args);
}
......@@ -95,6 +96,7 @@ void eprint(FILE *trace_file __attribute__ ((unused)),
fputc('\n', trace_file);
if (trace_file != stderr)
{
va_start(args, format);
my_printv_error(HA_ERR_INITIALIZATION, format, MYF(0), args);
}
va_end(args);
......
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