Files
gentoo-zh/dev-db/mysql-proxy/files/fix_read_query_result_ignore.patch
T

21 lines
893 B
Diff

# The patch is from bkersten, https://answers.launchpad.net/mysql-proxy/+question/122408
--- mysql-proxy-9999.orig/plugins/proxy/proxy-plugin.c 2010-08-26 12:02:14.000000000 +0800
+++ mysql-proxy-9999/plugins/proxy/proxy-plugin.c 2010-08-26 12:03:03.000000000 +0800
@@ -1361,11 +1361,13 @@
network_mysqld_queue_reset(recv_sock);
NETWORK_MYSQLD_CON_TRACK_TIME(con, "proxy::ready_query_result::enter_lua");
- proxy_lua_read_query_result(con);
+ network_mysqld_lua_stmt_ret ret = proxy_lua_read_query_result(con);
NETWORK_MYSQLD_CON_TRACK_TIME(con, "proxy::ready_query_result::leave_lua");
- /** recv_sock might be != con->server now */
- network_mysqld_queue_reset(send_sock);
+ if (ret != PROXY_IGNORE_RESULT) {
+ /** recv_sock might be != con->server now */
+ network_mysqld_queue_reset(send_sock);
+ }
/**
* if the send-queue is empty, we have nothing to send