Skip to content

Commit

Permalink
add 'set autocommit = OFF' support
Browse files Browse the repository at this point in the history
  • Loading branch information
winkyao committed Sep 29, 2015
1 parent de48e78 commit 128b054
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/proxy/proxy-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 128b054

Please sign in to comment.