~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.cc

  • Committer: Brian Aker
  • Date: 2009-08-11 20:22:59 UTC
  • mfrom: (1093.1.59 captain)
  • Revision ID: brian@gaz-20090811202259-5a92huu2yqmzdx1u
MErge Jay

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
 
785
786
  return error;
786
787
}
787
788
 
788
 
 
789
 
 
790
 
 
791
789
/**
792
790
  return the list of XID's to a client, the same way SHOW commands do.
793
791
 
799
797
bool mysql_xa_recover(Session *session)
800
798
{
801
799
  List<Item> field_list;
802
 
  Protocol *protocol= session->protocol;
803
 
  int i=0;
 
800
  plugin::Protocol *protocol= session->protocol;
 
801
  int i= 0;
804
802
  XID_STATE *xs;
805
803
 
806
804
  field_list.push_back(new Item_int("formatID", 0, MY_INT32_NUM_DECIMAL_DIGITS));
808
806
  field_list.push_back(new Item_int("bqual_length", 0, MY_INT32_NUM_DECIMAL_DIGITS));
809
807
  field_list.push_back(new Item_empty_string("data",XIDDATASIZE));
810
808
 
811
 
  if (protocol->sendFields(&field_list,
812
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
809
  if (protocol->sendFields(&field_list))
813
810
    return 1;
814
811
 
815
812
  pthread_mutex_lock(&LOCK_xid_cache);
2622
2619
  return error ?  error : error1;
2623
2620
}
2624
2621
 
2625
 
 
2626
2622
static bool stat_print(Session *session, const char *type, uint32_t type_len,
2627
2623
                       const char *file, uint32_t file_len,
2628
2624
                       const char *status, uint32_t status_len)
2629
2625
{
2630
 
  Protocol *protocol= session->protocol;
 
2626
  plugin::Protocol *protocol= session->protocol;
2631
2627
  protocol->prepareForResend();
2632
2628
  protocol->store(type, type_len);
2633
2629
  protocol->store(file, file_len);
2640
2636
bool ha_show_status(Session *session, StorageEngine *engine, enum ha_stat_type stat)
2641
2637
{
2642
2638
  List<Item> field_list;
2643
 
  Protocol *protocol= session->protocol;
 
2639
  plugin::Protocol *protocol= session->protocol;
2644
2640
  bool result;
2645
2641
 
2646
2642
  field_list.push_back(new Item_empty_string("Type",10));
2647
2643
  field_list.push_back(new Item_empty_string("Name",FN_REFLEN));
2648
2644
  field_list.push_back(new Item_empty_string("Status",10));
2649
2645
 
2650
 
  if (protocol->sendFields(&field_list,
2651
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
2646
  if (protocol->sendFields(&field_list))
2652
2647
    return true;
2653
2648
 
2654
2649
  result= engine->show_status(session, stat_print, stat) ? 1 : 0;