~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.h

  • Committer: Brian Aker
  • Date: 2008-10-20 04:28:21 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020042821-rqqdrccuu8195k3y
Second pass of thd cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
class Protocol
27
27
{
28
28
protected:
29
 
  Session        *thd;
 
29
  Session        *session;
30
30
  String *packet;
31
31
  String *convert;
32
32
  uint32_t field_pos;
38
38
                        const CHARSET_INFO * const fromcs, const CHARSET_INFO * const tocs);
39
39
public:
40
40
  Protocol() {}
41
 
  Protocol(Session *thd_arg) { init(thd_arg); }
 
41
  Protocol(Session *session_arg) { init(session_arg); }
42
42
  virtual ~Protocol() {}
43
 
  void init(Session* thd_arg);
 
43
  void init(Session* session_arg);
44
44
 
45
45
  enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 };
46
46
  virtual bool send_fields(List<Item> *list, uint32_t flags);
67
67
    return 0;
68
68
  }
69
69
  virtual bool flush();
70
 
  virtual void end_partial_result_set(Session *thd);
 
70
  virtual void end_partial_result_set(Session *session);
71
71
  virtual void prepare_for_resend()=0;
72
72
 
73
73
  virtual bool store_null()=0;
104
104
{
105
105
public:
106
106
  Protocol_text() {}
107
 
  Protocol_text(Session *thd_arg) :Protocol(thd_arg) {}
 
107
  Protocol_text(Session *session_arg) :Protocol(session_arg) {}
108
108
  virtual void prepare_for_resend();
109
109
  virtual bool store_null();
110
110
  virtual bool store_tiny(int64_t from);
124
124
  virtual enum enum_protocol_type type() { return PROTOCOL_TEXT; };
125
125
};
126
126
 
127
 
void send_warning(Session *thd, uint32_t sql_errno, const char *err=0);
128
 
void net_send_error(Session *thd, uint32_t sql_errno=0, const char *err=0);
129
 
void net_end_statement(Session *thd);
 
127
void send_warning(Session *session, uint32_t sql_errno, const char *err=0);
 
128
void net_send_error(Session *session, uint32_t sql_errno=0, const char *err=0);
 
129
void net_end_statement(Session *session);
130
130
unsigned char *net_store_data(unsigned char *to,const unsigned char *from, size_t length);
131
131
unsigned char *net_store_data(unsigned char *to,int32_t from);
132
132
unsigned char *net_store_data(unsigned char *to,int64_t from);