~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Brian Aker
  • Date: 2009-04-09 01:50:49 UTC
  • mfrom: (971.3.21 eday-dev)
  • Revision ID: brian@gaz-20090409015049-ohyn58r972hkccj2
MergeĀ Eric

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
 
2644
2644
        if (session->is_error())
2645
2645
        {
2646
2646
          const char *err_msg= session->main_da.message();
2647
 
          if (!session->protocol->io_ok())
 
2647
          if (!session->protocol->isConnected())
2648
2648
          {
2649
2649
            errmsg_printf(ERRMSG_LVL_ERROR, "%s", err_msg);
2650
2650
          }
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)
5336
5336
    {
5337
5337
      /* Table didn't exist */
5338
 
      protocol->store_null();
 
5338
      protocol->store();
5339
5339
      session->clear_error();
5340
5340
    }
5341
5341
    else
5345
5345
        protocol->store((uint64_t)t->file->checksum());
5346
5346
      else if (!(t->file->ha_table_flags() & HA_HAS_CHECKSUM) &&
5347
5347
               (check_opt->flags & T_QUICK))
5348
 
        protocol->store_null();
 
5348
        protocol->store();
5349
5349
      else
5350
5350
      {
5351
5351
        /* calculating table's checksum */
5355
5355
        t->use_all_columns();
5356
5356
 
5357
5357
        if (t->file->ha_rnd_init(1))
5358
 
          protocol->store_null();
 
5358
          protocol->store();
5359
5359
        else
5360
5360
        {
5361
5361
          for (;;)