Skip to content

Commit

Permalink
Fix more prepare stmt id related problems
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbin579 committed Jul 9, 2019
1 parent 90df8e8 commit c870f94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion plugins/proxy/proxy-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,7 @@ network_read_query(network_mysqld_con *con, proxy_plugin_con_t *st)
con->slave_conn_shortaged = 0;
con->use_slave_forced = 0;
con->candidate_fast_streamed = 0;
con->candidate_tcp_streamed = 1;

network_injection_queue_reset(st->injected.queries);

Expand Down Expand Up @@ -1425,8 +1426,9 @@ network_read_query(network_mysqld_con *con, proxy_plugin_con_t *st)
case COM_BINLOG_DUMP:
network_mysqld_con_send_error(con->client, C("(proxy) unable to process binlog dump"));
return PROXY_SEND_RESULT;
case COM_QUERY:
case COM_STMT_PREPARE:
con->candidate_tcp_streamed = 0;
case COM_QUERY:
if (!process_query_or_stmt_prepare(con, st, &packet, &query_attr, command, &disp_flag)) {
return disp_flag;
}
Expand Down
2 changes: 1 addition & 1 deletion src/network-mysqld.c
Original file line number Diff line number Diff line change
Expand Up @@ -4231,7 +4231,7 @@ normal_read_query_result(network_mysqld_con *con, network_mysqld_con_state_t ost
}

}
if (!g_queue_is_empty(con->client->send_queue->chunks)) {
if (con->candidate_tcp_streamed && !g_queue_is_empty(con->client->send_queue->chunks)) {
g_debug("%s: send_part_content_to_client:%p", G_STRLOC, con);
send_part_content_to_client(con);
}
Expand Down

0 comments on commit c870f94

Please sign in to comment.