mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-11-30 02:47:35 +08:00
Merge branch 'master' into multi-process
This commit is contained in:
commit
323f1e46f9
@ -132,6 +132,11 @@ NETWORK_MYSQLD_PLUGIN_PROTO(server_read_auth) {
|
||||
send_sock = con->client;
|
||||
|
||||
packet.data = g_queue_peek_head(recv_sock->recv_queue->chunks);
|
||||
if (packet.data == NULL) {
|
||||
g_critical("%s: packet.data is nil", G_STRLOC);
|
||||
return NETWORK_SOCKET_ERROR;
|
||||
}
|
||||
|
||||
packet.offset = 0;
|
||||
|
||||
/* decode the packet */
|
||||
|
@ -1234,6 +1234,13 @@ network_read_query(network_mysqld_con *con, proxy_plugin_con_t *st)
|
||||
network_packet packet;
|
||||
GQueue *recv_queue = con->client->recv_queue->chunks;
|
||||
packet.data = g_queue_peek_head(recv_queue);
|
||||
|
||||
if (packet.data == NULL) {
|
||||
g_critical("%s: chunk is null", G_STRLOC);
|
||||
network_mysqld_con_send_error(con->client, C("(proxy) unable to retrieve command"));
|
||||
return PROXY_SEND_RESULT;
|
||||
}
|
||||
|
||||
packet.offset = 0;
|
||||
|
||||
mysqld_query_attr_t query_attr = { 0 };
|
||||
|
@ -204,6 +204,14 @@ NETWORK_MYSQLD_PLUGIN_PROTO(proxy_read_query)
|
||||
GQueue *chunks = con->client->recv_queue->chunks;
|
||||
network_packet p;
|
||||
p.data = g_queue_peek_head(chunks);
|
||||
if (p.data == NULL) {
|
||||
g_critical("%s: packet data is nil", G_STRLOC);
|
||||
network_mysqld_con_send_error(con->client, C("(proxy) unable to process command"));
|
||||
con->state = ST_SEND_QUERY_RESULT;
|
||||
network_mysqld_queue_reset(con->client);
|
||||
return NETWORK_SOCKET_SUCCESS;
|
||||
}
|
||||
|
||||
p.offset = 0;
|
||||
network_mysqld_con_reset_command_response_state(con);
|
||||
g_debug("%s: call network_mysqld_con_command_states_init", G_STRLOC);
|
||||
|
Loading…
Reference in New Issue
Block a user