Skip to content

Commit

Permalink
remove uuid and connected_clients in admin.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Qihoo360 committed Jan 10, 2014
1 parent 76fba41 commit 28c4eb4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions lib/admin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ function read_query(packet)
type = proxy.MYSQL_TYPE_STRING },
{ name = "type",
type = proxy.MYSQL_TYPE_STRING },
{ name = "uuid",
type = proxy.MYSQL_TYPE_STRING },
{ name = "connected_clients",
type = proxy.MYSQL_TYPE_LONG },
-- { name = "uuid",
-- type = proxy.MYSQL_TYPE_STRING },
-- { name = "connected_clients",
-- type = proxy.MYSQL_TYPE_LONG },
--[[
{ name = "cur_idle_connections",
type = proxy.MYSQL_TYPE_LONG },
Expand All @@ -88,8 +88,8 @@ function read_query(packet)
b.dst.name, -- configured backend address
states[b.state + 1], -- the C-id is pushed down starting at 0
types[b.type + 1], -- the C-id is pushed down starting at 0
b.uuid, -- the MySQL Server's UUID if it is managed
b.connected_clients -- currently connected clients
--b.uuid, -- the MySQL Server's UUID if it is managed
--b.connected_clients -- currently connected clients
}

--[[
Expand Down Expand Up @@ -133,10 +133,10 @@ function read_query(packet)
type = proxy.MYSQL_TYPE_STRING },
{ name = "type",
type = proxy.MYSQL_TYPE_STRING },
{ name = "uuid",
type = proxy.MYSQL_TYPE_STRING },
{ name = "connected_clients",
type = proxy.MYSQL_TYPE_LONG },
-- { name = "uuid",
-- type = proxy.MYSQL_TYPE_STRING },
-- { name = "connected_clients",
-- type = proxy.MYSQL_TYPE_LONG },
}

local states = {
Expand All @@ -157,8 +157,8 @@ function read_query(packet)
b.dst.name, -- configured backend address
states[b.state + 1], -- the C-id is pushed down starting at 0
types[b.type + 1], -- the C-id is pushed down starting at 0
b.uuid, -- the MySQL Server's UUID if it is managed
b.connected_clients -- currently connected clients
-- b.uuid, -- the MySQL Server's UUID if it is managed
-- b.connected_clients -- currently connected clients
}
elseif string.find(query:lower(), "^add%s+master%s+.+$") then
local newserver = string.match(query:lower(), "^add%s+master%s+(.+)$")
Expand Down
4 changes: 2 additions & 2 deletions src/network-conn-pool-lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int network_connection_pool_lua_add_connection(network_mysqld_con *con) {
chassis_event_add_local(con->srv, &(con->server->event)); /* add a event, but stay in the same thread */
}

st->backend->connected_clients--;
// st->backend->connected_clients--;
st->backend = NULL;
st->backend_ndx = -1;

Expand Down Expand Up @@ -324,7 +324,7 @@ network_socket *network_connection_pool_lua_swap(network_mysqld_con *con, int ba

/* connect to the new backend */
st->backend = backend;
st->backend->connected_clients++;
// st->backend->connected_clients++;
st->backend_ndx = backend_ndx;

return send_sock;
Expand Down

0 comments on commit 28c4eb4

Please sign in to comment.