Skip to content

Commit 28c4eb4

Browse files
author
Qihoo360
committed
remove uuid and connected_clients in admin.lua
1 parent 76fba41 commit 28c4eb4

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

lib/admin.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ function read_query(packet)
5959
type = proxy.MYSQL_TYPE_STRING },
6060
{ name = "type",
6161
type = proxy.MYSQL_TYPE_STRING },
62-
{ name = "uuid",
63-
type = proxy.MYSQL_TYPE_STRING },
64-
{ name = "connected_clients",
65-
type = proxy.MYSQL_TYPE_LONG },
62+
-- { name = "uuid",
63+
-- type = proxy.MYSQL_TYPE_STRING },
64+
-- { name = "connected_clients",
65+
-- type = proxy.MYSQL_TYPE_LONG },
6666
--[[
6767
{ name = "cur_idle_connections",
6868
type = proxy.MYSQL_TYPE_LONG },
@@ -88,8 +88,8 @@ function read_query(packet)
8888
b.dst.name, -- configured backend address
8989
states[b.state + 1], -- the C-id is pushed down starting at 0
9090
types[b.type + 1], -- the C-id is pushed down starting at 0
91-
b.uuid, -- the MySQL Server's UUID if it is managed
92-
b.connected_clients -- currently connected clients
91+
--b.uuid, -- the MySQL Server's UUID if it is managed
92+
--b.connected_clients -- currently connected clients
9393
}
9494

9595
--[[
@@ -133,10 +133,10 @@ function read_query(packet)
133133
type = proxy.MYSQL_TYPE_STRING },
134134
{ name = "type",
135135
type = proxy.MYSQL_TYPE_STRING },
136-
{ name = "uuid",
137-
type = proxy.MYSQL_TYPE_STRING },
138-
{ name = "connected_clients",
139-
type = proxy.MYSQL_TYPE_LONG },
136+
-- { name = "uuid",
137+
-- type = proxy.MYSQL_TYPE_STRING },
138+
-- { name = "connected_clients",
139+
-- type = proxy.MYSQL_TYPE_LONG },
140140
}
141141

142142
local states = {
@@ -157,8 +157,8 @@ function read_query(packet)
157157
b.dst.name, -- configured backend address
158158
states[b.state + 1], -- the C-id is pushed down starting at 0
159159
types[b.type + 1], -- the C-id is pushed down starting at 0
160-
b.uuid, -- the MySQL Server's UUID if it is managed
161-
b.connected_clients -- currently connected clients
160+
-- b.uuid, -- the MySQL Server's UUID if it is managed
161+
-- b.connected_clients -- currently connected clients
162162
}
163163
elseif string.find(query:lower(), "^add%s+master%s+.+$") then
164164
local newserver = string.match(query:lower(), "^add%s+master%s+(.+)$")

src/network-conn-pool-lua.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int network_connection_pool_lua_add_connection(network_mysqld_con *con) {
126126
chassis_event_add_local(con->srv, &(con->server->event)); /* add a event, but stay in the same thread */
127127
}
128128

129-
st->backend->connected_clients--;
129+
// st->backend->connected_clients--;
130130
st->backend = NULL;
131131
st->backend_ndx = -1;
132132

@@ -324,7 +324,7 @@ network_socket *network_connection_pool_lua_swap(network_mysqld_con *con, int ba
324324

325325
/* connect to the new backend */
326326
st->backend = backend;
327-
st->backend->connected_clients++;
327+
// st->backend->connected_clients++;
328328
st->backend_ndx = backend_ndx;
329329

330330
return send_sock;

0 commit comments

Comments
 (0)