diff options
author | unknown <jimw@mysql.com> | 2005-03-15 16:37:05 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-03-15 16:37:05 -0800 |
commit | 5ed4fd6ba93c9e30c17d922da86c8e0df0e92e50 (patch) | |
tree | 2b9035b58b120f1de38c95b59b07b41dd47c6d45 /client | |
parent | e656fba7788dcb42c2c74a6f5a575f28e284aa03 (diff) | |
download | mariadb-git-5ed4fd6ba93c9e30c17d922da86c8e0df0e92e50.tar.gz |
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().
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 46bfc7d880f..0c229796c1e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3073,9 +3073,14 @@ void tee_fprintf(FILE *file, const char *fmt, ...) #ifdef OS2 fflush( file); #endif + va_end(args); + if (opt_outfile) + { + va_start(args, fmt); (void) vfprintf(OUTFILE, fmt, args); - va_end(args); + va_end(args); + } } |