diff options
author | Jim Winstead <jimw@mysql.com> | 2009-05-18 18:23:43 -0700 |
---|---|---|
committer | Jim Winstead <jimw@mysql.com> | 2009-05-18 18:23:43 -0700 |
commit | 9796aec8763298883fff11254bdbd2dd2ad0781d (patch) | |
tree | ad164108251d1aa5cbe732bc2d9710191d47ed3c /client/mysqlslap.c | |
parent | 1f6fa46b7a3fc8564ab552b1b01aff04483df68a (diff) | |
download | mariadb-git-9796aec8763298883fff11254bdbd2dd2ad0781d.tar.gz |
mysqlslap didn't correctly handle --csv with no argument. (Bug #44412)
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r-- | client/mysqlslap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 4cf8c7204ed..3c6a38228af 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -565,8 +565,7 @@ static struct my_option my_long_options[] = REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"csv", OPT_SLAP_CSV, "Generate CSV output to named file or to stdout if no file is named.", - (uchar**) &opt_csv_str, (uchar**) &opt_csv_str, 0, GET_STR, - OPT_ARG, 0, 0, 0, 0, 0, 0}, + NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #ifdef DBUG_OFF {"debug", '#', "This is a non-debug version. Catch this and exit.", 0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, @@ -740,6 +739,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), DBUG_PUSH(argument ? argument : default_dbug_option); debug_check_flag= 1; break; + case OPT_SLAP_CSV: + if (!argument) + argument= (char *)"-"; /* use stdout */ + opt_csv_str= argument; + break; #include <sslopt-case.h> case 'V': print_version(); |