~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

  • Committer: Monty Taylor
  • Date: 2008-09-14 19:39:48 UTC
  • mfrom: (383.1.43 client-split)
  • Revision ID: monty@inaugust.com-20080914193948-ns2p0lts4qtsqx7n
Merged from client-split.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
static unsigned int num_char_cols_index= 0;
158
158
static unsigned int iterations;
159
159
static uint my_end_arg= 0;
160
 
static char *default_charset= (char*) DRIZZLE_DEFAULT_CHARSET_NAME;
161
160
static uint64_t actual_queries= 0;
162
161
static uint64_t auto_actual_queries;
163
162
static uint64_t auto_generate_sql_unique_write_number;
319
318
 
320
319
  MY_INIT(argv[0]);
321
320
 
322
 
  if (!(drizzle_thread_safe()))
323
 
    fprintf(stderr, "This application was compiled incorrectly. Please recompile with thread support.\n");
324
 
 
325
321
  load_defaults("my",load_default_groups,&argc,&argv);
326
322
  defaults_argv=argv;
327
323
  if (get_options(&argc,&argv))
1963
1959
  struct timespec abstime;
1964
1960
 
1965
1961
 
1966
 
 
1967
 
  if (drizzle_thread_init())
1968
 
  {
1969
 
    fprintf(stderr,"%s: drizzle_thread_init() failed.\n",
1970
 
            my_progname);
1971
 
    exit(1);
1972
 
  }
1973
 
 
1974
1962
  /*
1975
1963
    We lock around the initial call in case were we in a loop. This
1976
1964
    also keeps the value properly syncronized across call threads.
1992
1980
  timer_alarm= false;
1993
1981
  pthread_mutex_unlock(&timer_alarm_mutex);
1994
1982
 
1995
 
  drizzle_thread_end();
1996
1983
  return(0);
1997
1984
}
1998
1985
 
2007
1994
  statement *ptr;
2008
1995
  thread_context *con= (thread_context *)p;
2009
1996
 
2010
 
  if (drizzle_thread_init())
2011
 
  {
2012
 
    fprintf(stderr,"%s: drizzle_thread_init() failed.\n",
2013
 
            my_progname);
2014
 
    exit(1);
2015
 
  }
2016
 
 
2017
1997
  pthread_mutex_lock(&sleeper_mutex);
2018
1998
  while (master_wakeup)
2019
1999
  {
2139
2119
 
2140
2120
  my_free(con, MYF(0));
2141
2121
 
2142
 
  drizzle_thread_end();
2143
2122
  return(0);
2144
2123
}
2145
2124
 
2490
2469
    drizzle_options(drizzle,DRIZZLE_OPT_COMPRESS,NullS);
2491
2470
  /* We always do opt_protocol to TCP/IP */
2492
2471
  drizzle_options(drizzle,DRIZZLE_OPT_PROTOCOL,(char*)&opt_protocol);
2493
 
  drizzle_options(drizzle, DRIZZLE_SET_CHARSET_NAME, default_charset);
2494
2472
 
2495
2473
  for (x= 0; x < 10; x++)
2496
2474
  {