Skip to content

Commit

Permalink
Fix segment problems relate to prepare stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbin579 committed Jul 8, 2019
1 parent f1401ed commit 23d95a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/proxy/proxy-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,9 @@ change_server_by_rw(network_mysqld_con *con, int backend_ndx)
{
if (backend_ndx >= 0) {
proxy_plugin_con_t *st = con->plugin_con_state;
int index = st->backend_ndx_array[backend_ndx] - 1;
g_debug("conn:%p, change_server_by_rw,ndx:%d, index:%d, st ndx:%d", con, backend_ndx, index, st->backend_ndx);
if (con->servers != NULL) {
int index = st->backend_ndx_array[backend_ndx] - 1;
g_debug("conn:%p, change_server_by_rw,ndx:%d, index:%d, st ndx:%d", con, backend_ndx, index, st->backend_ndx);
con->server = g_ptr_array_index(con->servers, index);
st->backend_ndx = backend_ndx;
}
Expand Down
1 change: 1 addition & 0 deletions src/network-conn-pool-wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ network_pool_add_conn(network_mysqld_con *con, int is_swap)

g_ptr_array_free(con->servers, TRUE);
con->servers = NULL;
con->multiple_server_mode = 0;

if (st->backend_ndx_array) {
g_free(st->backend_ndx_array);
Expand Down

0 comments on commit 23d95a5

Please sign in to comment.