~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.cc

Merging Eric's refactoring and cleanup of Listen and Protocol

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include "drizzled/message/table.pb.h"
42
42
 
43
43
using namespace std;
 
44
using namespace drizzled;
44
45
 
45
46
extern drizzled::ReplicationServices replication_services;
46
47
 
799
800
bool mysql_xa_recover(Session *session)
800
801
{
801
802
  List<Item> field_list;
802
 
  Protocol *protocol= session->protocol;
 
803
  plugin::Protocol *protocol= session->protocol;
803
804
  int i=0;
804
805
  XID_STATE *xs;
805
806
 
808
809
  field_list.push_back(new Item_int("bqual_length", 0, MY_INT32_NUM_DECIMAL_DIGITS));
809
810
  field_list.push_back(new Item_empty_string("data",XIDDATASIZE));
810
811
 
811
 
  if (protocol->sendFields(&field_list,
812
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
812
  if (protocol->sendFields(&field_list))
813
813
    return 1;
814
814
 
815
815
  pthread_mutex_lock(&LOCK_xid_cache);
2627
2627
                       const char *file, uint32_t file_len,
2628
2628
                       const char *status, uint32_t status_len)
2629
2629
{
2630
 
  Protocol *protocol= session->protocol;
 
2630
  plugin::Protocol *protocol= session->protocol;
2631
2631
  protocol->prepareForResend();
2632
2632
  protocol->store(type, type_len);
2633
2633
  protocol->store(file, file_len);
2640
2640
bool ha_show_status(Session *session, StorageEngine *engine, enum ha_stat_type stat)
2641
2641
{
2642
2642
  List<Item> field_list;
2643
 
  Protocol *protocol= session->protocol;
 
2643
  plugin::Protocol *protocol= session->protocol;
2644
2644
  bool result;
2645
2645
 
2646
2646
  field_list.push_back(new Item_empty_string("Type",10));
2647
2647
  field_list.push_back(new Item_empty_string("Name",FN_REFLEN));
2648
2648
  field_list.push_back(new Item_empty_string("Status",10));
2649
2649
 
2650
 
  if (protocol->sendFields(&field_list,
2651
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
2650
  if (protocol->sendFields(&field_list))
2652
2651
    return true;
2653
2652
 
2654
2653
  result= engine->show_status(session, stat_print, stat) ? 1 : 0;