mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix 'tee' command in mysql client. (Bug #8499)
client/mysql.cc: A va_list can't be reused without being copied or reset, so don't try to reuse it in tee_fprintf().
This commit is contained in:
@@ -3073,9 +3073,14 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
|
|||||||
#ifdef OS2
|
#ifdef OS2
|
||||||
fflush( file);
|
fflush( file);
|
||||||
#endif
|
#endif
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
if (opt_outfile)
|
if (opt_outfile)
|
||||||
|
{
|
||||||
|
va_start(args, fmt);
|
||||||
(void) vfprintf(OUTFILE, fmt, args);
|
(void) vfprintf(OUTFILE, fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user