~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.cc

  • Committer: Brian Aker
  • Date: 2009-10-06 17:55:59 UTC
  • mfrom: (1160.1.5 foo)
  • Revision ID: brian@gaz-20091006175559-efaijw5igeb9zn6e
SE cleanup interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2600
2600
  return error ?  error : error1;
2601
2601
}
2602
2602
 
2603
 
static bool stat_print(Session *session, const char *type, uint32_t type_len,
2604
 
                       const char *file, uint32_t file_len,
2605
 
                       const char *status, uint32_t status_len)
2606
 
{
2607
 
  session->client->store(type, type_len);
2608
 
  session->client->store(file, file_len);
2609
 
  session->client->store(status, status_len);
2610
 
  if (session->client->flush())
2611
 
    return true;
2612
 
  return false;
2613
 
}
2614
 
 
2615
 
bool ha_show_status(Session *session, plugin::StorageEngine *engine, enum ha_stat_type stat)
2616
 
{
2617
 
  List<Item> field_list;
2618
 
  bool result;
2619
 
 
2620
 
  field_list.push_back(new Item_empty_string("Type",10));
2621
 
  field_list.push_back(new Item_empty_string("Name",FN_REFLEN));
2622
 
  field_list.push_back(new Item_empty_string("Status",10));
2623
 
 
2624
 
  if (session->client->sendFields(&field_list))
2625
 
    return true;
2626
 
 
2627
 
  result= engine->show_status(session, stat_print, stat) ? 1 : 0;
2628
 
 
2629
 
  if (!result)
2630
 
    session->my_eof();
2631
 
  return result;
2632
 
}
2633
 
 
2634
 
 
2635
2603
/**
2636
2604
  Check if the conditions for row-based binlogging is correct for the table.
2637
2605