mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-12-02 03:47:41 +08:00
fix error:select conn_num from backends
This commit is contained in:
parent
6921d53dc7
commit
a64da7468e
@ -1438,9 +1438,12 @@ admin_send_connection_stat(network_mysqld_con *con, const char *sql)
|
||||
if (backend_ndx >= 0 && backend_ndx < network_backends_count(g->backends)) {
|
||||
network_backend_t *backend = network_backends_get(g->backends, backend_ndx);
|
||||
GString *user_name = g_string_new(user);
|
||||
GQueue *conns = NULL;
|
||||
|
||||
if(backend && backend->pool && backend->pool->users && user_name) {
|
||||
conns = g_hash_table_lookup(backend->pool->users, user_name);
|
||||
}
|
||||
|
||||
/* TODO: if robbed, conns is not for user_name */
|
||||
GQueue *conns = network_connection_pool_get_conns(backend->pool, user_name, NULL);
|
||||
if (conns) {
|
||||
numstr = g_strdup_printf("%d", conns->length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user