~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

Merge Stewart

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
const char *create_schema_string= "drizzleslap";
130
130
 
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;
327
325
  if (get_options(&argc,&argv))
328
326
  {
329
327
    free_defaults(defaults_argv);
330
 
    my_end(0);
 
328
    my_end();
331
329
    exit(1);
332
330
  }
333
331
 
346
344
  {
347
345
    fprintf(stderr,"%s: Too many arguments\n",my_progname);
348
346
    free_defaults(defaults_argv);
349
 
    my_end(0);
 
347
    my_end();
350
348
    exit(1);
351
349
  }
352
350
 
422
420
    free(shared_memory_base_name);
423
421
#endif
424
422
  free_defaults(defaults_argv);
425
 
  my_end(my_end_arg);
 
423
  my_end();
426
424
 
427
425
  return 0;
428
426
}
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,
593
 
   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,
1287
1277
 
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;
1294
1280
 
1295
1281
  if (!user)
1296
1282
    user= (char *)"root";