From 128b0544cefc800366f70e534c5130f35574721c Mon Sep 17 00:00:00 2001 From: winkyao <82091309@qq.com> Date: Tue, 29 Sep 2015 10:46:31 +0800 Subject: [PATCH] add 'set autocommit = OFF' support --- plugins/proxy/proxy-plugin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/proxy/proxy-plugin.c b/plugins/proxy/proxy-plugin.c index 6671d49..c9b20ca 100644 --- a/plugins/proxy/proxy-plugin.c +++ b/plugins/proxy/proxy-plugin.c @@ -1233,7 +1233,6 @@ void modify_charset(GPtrArray* tokens, network_mysqld_con* con) { void check_flags(GPtrArray* tokens, network_mysqld_con* con) { con->is_in_select_calc_found_rows = FALSE; - *is_set_autocommit = FALSE; sql_token** ts = (sql_token**)(tokens->pdata); guint len = tokens->len; @@ -1455,7 +1454,7 @@ NETWORK_MYSQLD_PLUGIN_PROTO(proxy_read_query) { if (!con->is_in_transaction && !con->is_not_autocommit && g_hash_table_size(con->locks) == 0) { if (type == COM_QUERY) { - if (is_write || is_set_autocommit) { + if (is_write ) { backend_ndx = idle_rw(con); } else { backend_ndx = rw_split(tokens, con);