1
/* Copyright (C) 2002-2006 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#ifdef USE_PRAGMA_INTERFACE
17
#pragma interface /* gcc class implementation */
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
23
typedef struct st_drizzle_field DRIZZLE_FIELD;
24
24
typedef struct st_drizzle_rows DRIZZLE_ROWS;
34
bool net_store_data(const uchar *from, size_t length);
35
bool net_store_data(const uchar *from, size_t length,
34
bool net_store_data(const unsigned char *from, size_t length);
35
bool net_store_data(const unsigned char *from, size_t length,
36
36
const CHARSET_INFO * const fromcs, const CHARSET_INFO * const tocs);
37
37
bool store_string_aux(const char *from, size_t length,
38
38
const CHARSET_INFO * const fromcs, const CHARSET_INFO * const tocs);
41
Protocol(THD *thd_arg) { init(thd_arg); }
41
Protocol(Session *session_arg) { init(session_arg); }
42
42
virtual ~Protocol() {}
43
void init(THD* thd_arg);
43
void init(Session* session_arg);
45
45
enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 };
46
virtual bool send_fields(List<Item> *list, uint flags);
46
virtual bool send_fields(List<Item> *list, uint32_t flags);
48
48
bool store(I_List<i_string> *str_list);
49
49
bool store(const char *from, const CHARSET_INFO * const cs);
124
124
virtual enum enum_protocol_type type() { return PROTOCOL_TEXT; };
127
void send_warning(THD *thd, uint sql_errno, const char *err=0);
128
void net_send_error(THD *thd, uint sql_errno=0, const char *err=0);
129
void net_end_statement(THD *thd);
130
uchar *net_store_data(uchar *to,const uchar *from, size_t length);
131
uchar *net_store_data(uchar *to,int32_t from);
132
uchar *net_store_data(uchar *to,int64_t from);
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
unsigned char *net_store_data(unsigned char *to,const unsigned char *from, size_t length);
131
unsigned char *net_store_data(unsigned char *to,int32_t from);
132
unsigned char *net_store_data(unsigned char *to,int64_t from);