~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

Finished first pass at Protocol cleanup, still some things to remove but they are a bit more involved.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2193
2193
 
2194
2194
{
2195
2195
  Protocol *protocol= session->protocol;
2196
 
  protocol->prepare_for_resend();
 
2196
  protocol->prepareForResend();
2197
2197
  protocol->store(table->alias, system_charset_info);
2198
2198
  protocol->store((char*) operator_name, system_charset_info);
2199
2199
  protocol->store(STRING_WITH_LEN("error"), system_charset_info);
2386
2386
  item->maybe_null = 1;
2387
2387
  field_list.push_back(item = new Item_empty_string("Msg_text", 255, cs));
2388
2388
  item->maybe_null = 1;
2389
 
  if (protocol->send_fields(&field_list,
2390
 
                            Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
2389
  if (protocol->sendFields(&field_list,
 
2390
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
2391
2391
    return(true);
2392
2392
 
2393
2393
  for (table= tables; table; table= table->next_local)
2463
2463
      /* purecov: begin inspected */
2464
2464
      char buff[FN_REFLEN + DRIZZLE_ERRMSG_SIZE];
2465
2465
      uint32_t length;
2466
 
      protocol->prepare_for_resend();
 
2466
      protocol->prepareForResend();
2467
2467
      protocol->store(table_name, system_charset_info);
2468
2468
      protocol->store(operator_name, system_charset_info);
2469
2469
      protocol->store(STRING_WITH_LEN("error"), system_charset_info);
2501
2501
    if (table->table->s->crashed && operator_func == &handler::ha_check)
2502
2502
    {
2503
2503
      /* purecov: begin inspected */
2504
 
      protocol->prepare_for_resend();
 
2504
      protocol->prepareForResend();
2505
2505
      protocol->store(table_name, system_charset_info);
2506
2506
      protocol->store(operator_name, system_charset_info);
2507
2507
      protocol->store(STRING_WITH_LEN("warning"), system_charset_info);
2544
2544
      DRIZZLE_ERROR *err;
2545
2545
      while ((err= it++))
2546
2546
      {
2547
 
        protocol->prepare_for_resend();
 
2547
        protocol->prepareForResend();
2548
2548
        protocol->store(table_name, system_charset_info);
2549
2549
        protocol->store((char*) operator_name, system_charset_info);
2550
2550
        protocol->store(warning_level_names[err->level].str,
2556
2556
      }
2557
2557
      drizzle_reset_errors(session, true);
2558
2558
    }
2559
 
    protocol->prepare_for_resend();
 
2559
    protocol->prepareForResend();
2560
2560
    protocol->store(table_name, system_charset_info);
2561
2561
    protocol->store(operator_name, system_charset_info);
2562
2562
 
2655
2655
            protocol->store(err_msg, system_charset_info);
2656
2656
            (void)protocol->write();
2657
2657
            /* Start off another row for HA_ADMIN_FAILED */
2658
 
            protocol->prepare_for_resend();
 
2658
            protocol->prepareForResend();
2659
2659
            protocol->store(table_name, system_charset_info);
2660
2660
            protocol->store(operator_name, system_charset_info);
2661
2661
          }
5314
5314
  field_list.push_back(item= new Item_int("Checksum", (int64_t) 1,
5315
5315
                                          MY_INT64_NUM_DECIMAL_DIGITS));
5316
5316
  item->maybe_null= 1;
5317
 
  if (protocol->send_fields(&field_list,
5318
 
                            Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
5317
  if (protocol->sendFields(&field_list,
 
5318
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
5319
5319
    return(true);
5320
5320
 
5321
5321
  /* Open one table after the other to keep lock time as short as possible. */
5329
5329
    t= table->table= open_n_lock_single_table(session, table, TL_READ);
5330
5330
    session->clear_error();                     // these errors shouldn't get client
5331
5331
 
5332
 
    protocol->prepare_for_resend();
 
5332
    protocol->prepareForResend();
5333
5333
    protocol->store(table_name, system_charset_info);
5334
5334
 
5335
5335
    if (!t)