129
129
const char *create_schema_string= "drizzleslap";
131
131
static bool opt_preserve= true;
132
static bool debug_info_flag= false, debug_check_flag= false;
133
132
static bool opt_only_print= false;
134
133
static bool opt_burnin= false;
135
134
static bool opt_ignore_sql_errors= false;
136
static bool opt_compress= false, tty_password= false,
135
static bool tty_password= false,
137
136
opt_silent= false,
138
137
auto_generate_sql_autoincrement= false,
139
138
auto_generate_sql_guid_primary= false,
162
161
static unsigned int num_int_cols_index= 0;
163
162
static unsigned int num_char_cols_index= 0;
164
163
static unsigned int iterations;
165
static uint32_t my_end_arg= 0;
166
164
static uint64_t actual_queries= 0;
167
165
static uint64_t auto_actual_queries;
168
166
static uint64_t auto_generate_sql_unique_write_number;
588
586
{"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
589
587
(char**) &commit_rate, (char**) &commit_rate, 0, GET_UINT, REQUIRED_ARG,
590
588
0, 0, 0, 0, 0, 0},
591
{"compress", 'C', "Use compression in server/client protocol.",
592
(char**) &opt_compress, (char**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
594
589
{"concurrency", 'c', "Number of clients to simulate for query to run.",
595
590
(char**) &concurrency_str, (char**) &concurrency_str, 0, GET_STR,
596
591
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
604
599
"Generate CSV output to named file or to stdout if no file is named.",
605
600
(char**) &opt_csv_str, (char**) &opt_csv_str, 0, GET_STR,
606
601
OPT_ARG, 0, 0, 0, 0, 0, 0},
607
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
608
(char**) &debug_check_flag, (char**) &debug_check_flag, 0,
609
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
610
{"debug-info", 'T', "Print some debug info at exit.", (char**) &debug_info_flag,
611
(char**) &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
612
602
{"delayed-start", OPT_SLAP_DELAYED_START,
613
603
"Delay the startup of threads by a random number of microsends (the maximum of the delay)",
614
604
(char**) &opt_delayed_start, (char**) &opt_delayed_start, 0, GET_UINT,
1288
1278
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
1289
1279
exit(ho_error);
1290
if (debug_info_flag)
1291
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
1292
if (debug_check_flag)
1293
my_end_arg= MY_CHECK_ERROR;
1296
1282
user= (char *)"root";