2
Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
2
Copyright (C) 2008 MySQL AB, 2008 Sun Microsystems, Inc
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; version 2 of the
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; version 2 of the License.
9
8
This program is distributed in the hope that it will be useful,
10
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
11
GNU General Public License for more details.
14
13
You should have received a copy of the GNU General Public License
15
14
along with this program; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
15
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
18
#ifndef __NETWORK_MYSQLD_PACKET__
37
35
* - high-level (grouping packets into a sequence)
41
NETWORK_MYSQLD_PROTOCOL_VERSION_PRE41,
42
NETWORK_MYSQLD_PROTOCOL_VERSION_41
43
} network_mysqld_protocol_t;
46
39
* tracking the state of the response of a COM_QUERY packet
50
43
PARSE_COM_QUERY_INIT,
51
44
PARSE_COM_QUERY_FIELD,
52
45
PARSE_COM_QUERY_RESULT,
53
PARSE_COM_QUERY_LOCAL_INFILE_DATA,
54
PARSE_COM_QUERY_LOCAL_INFILE_RESULT
46
PARSE_COM_QUERY_LOAD_DATA,
47
PARSE_COM_QUERY_LOAD_DATA_END_DATA
57
50
guint16 server_status;
71
64
NETWORK_API network_mysqld_com_query_result_t *network_mysqld_com_query_result_new(void);
72
65
NETWORK_API void network_mysqld_com_query_result_free(network_mysqld_com_query_result_t *udata);
73
NETWORK_API int network_mysqld_com_query_result_track_state(network_packet *packet, network_mysqld_com_query_result_t *udata) G_GNUC_DEPRECATED;
74
NETWORK_API gboolean network_mysqld_com_query_result_is_load_data(network_mysqld_com_query_result_t *udata) G_GNUC_DEPRECATED;
75
NETWORK_API gboolean network_mysqld_com_query_result_is_local_infile(network_mysqld_com_query_result_t *udata);
66
NETWORK_API int network_mysqld_com_query_result_track_state(network_packet *packet, network_mysqld_com_query_result_t *udata);
67
NETWORK_API gboolean network_mysqld_com_query_result_is_load_data(network_mysqld_com_query_result_t *udata);
76
68
NETWORK_API int network_mysqld_proto_get_com_query_result(network_packet *packet, network_mysqld_com_query_result_t *udata, gboolean use_binary_row_data);
110
102
NETWORK_API int network_mysqld_proto_get_query_result(network_packet *packet, network_mysqld_con *con);
111
NETWORK_API int network_mysqld_con_command_states_init(network_mysqld_con *con, network_packet *packet);
113
103
NETWORK_API GList *network_mysqld_proto_get_fielddefs(GList *chunk, GPtrArray *fields);
132
122
GString *sqlstate;
135
network_mysqld_protocol_t version;
136
125
} network_mysqld_err_packet_t;
138
127
NETWORK_API network_mysqld_err_packet_t *network_mysqld_err_packet_new(void);
139
NETWORK_API network_mysqld_err_packet_t *network_mysqld_err_packet_new_pre41(void);
140
128
NETWORK_API void network_mysqld_err_packet_free(network_mysqld_err_packet_t *udata);
142
130
NETWORK_API int network_mysqld_proto_get_err_packet(network_packet *packet, network_mysqld_err_packet_t *err_packet);