~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

  • Committer: Mark Atwood
  • Date: 2011-08-12 04:08:33 UTC
  • mfrom: (2385.2.17 refactor5)
  • Revision ID: me@mark.atwood.name-20110812040833-u6j85nc6ahuc0dtz
mergeĀ lp:~olafvdspek/drizzle/refactor5

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
    if ((ptr->getType() == UPDATE_TYPE_REQUIRES_PREFIX) ||
310
310
        (ptr->getType() == SELECT_TYPE_REQUIRES_PREFIX))
311
311
    {
312
 
      int length;
313
312
      uint32_t key_val;
314
313
      char buffer[HUGE_STRING_LENGTH];
315
314
 
324
323
      if (primary_keys.size())
325
324
      {
326
325
        key_val= (uint32_t)(random() % primary_keys.size());
327
 
        const char *key;
328
 
        key= primary_keys[key_val].c_str();
 
326
        const char *key= primary_keys[key_val].c_str();
329
327
 
330
328
        assert(key);
331
329
 
332
 
        length= snprintf(buffer, HUGE_STRING_LENGTH, "%.*s '%s'",
333
 
                         (int)ptr->getLength(), ptr->getString(), key);
 
330
        int length= snprintf(buffer, HUGE_STRING_LENGTH, "%.*s '%s'", (int)ptr->getLength(), ptr->getString(), key);
334
331
 
335
332
        if (run_query(con, &result, buffer, length))
336
333
        {
1262
1259
process_options(void)
1263
1260
{
1264
1261
  struct stat sbuf;
1265
 
  OptionString *sql_type;
1266
1262
  uint32_t sql_type_count= 0;
1267
1263
  ssize_t bytes_read= 0;
1268
1264
  
1405
1401
 
1406
1402
    query_statements.resize(query_statements_count);
1407
1403
 
1408
 
    sql_type= query_options;
 
1404
    OptionString* sql_type= query_options;
1409
1405
    do
1410
1406
    {
1411
1407
      if (sql_type->getString()[0] == 'r')