mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
mysqlslap didn't correctly handle --csv with no argument. (Bug #44412)
This commit is contained in:
@ -565,8 +565,7 @@ static struct my_option my_long_options[] =
|
|||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"csv", OPT_SLAP_CSV,
|
{"csv", OPT_SLAP_CSV,
|
||||||
"Generate CSV output to named file or to stdout if no file is named.",
|
"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,
|
NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
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);
|
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||||
debug_check_flag= 1;
|
debug_check_flag= 1;
|
||||||
break;
|
break;
|
||||||
|
case OPT_SLAP_CSV:
|
||||||
|
if (!argument)
|
||||||
|
argument= (char *)"-"; /* use stdout */
|
||||||
|
opt_csv_str= argument;
|
||||||
|
break;
|
||||||
#include <sslopt-case.h>
|
#include <sslopt-case.h>
|
||||||
case 'V':
|
case 'V':
|
||||||
print_version();
|
print_version();
|
||||||
|
Reference in New Issue
Block a user