mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Fix max_connections_per_hour handling when the global
max_user_connections is also set. (Bug #9947) sql/sql_parse.cc: Don't cap max_connections_per_hour to the global max_user_connections, since the latter is a limit of concurrent connections. Also, count number of concurrent connections for a user correctly, instead of starting at 2.
This commit is contained in:
parent
a7e66efc2c
commit
8efb9a0180
1 changed files with 10 additions and 12 deletions
|
|
@ -164,11 +164,9 @@ static int get_or_create_user_conn(THD *thd, const char *user,
|
|||
uc->user_len= user_len;
|
||||
uc->host= uc->user + uc->user_len + 1;
|
||||
uc->len= temp_len;
|
||||
uc->connections = 1;
|
||||
uc->connections= 0;
|
||||
uc->questions= uc->updates= uc->conn_per_hour=0;
|
||||
uc->user_resources= *mqh;
|
||||
if (max_user_connections && mqh->connections > max_user_connections)
|
||||
uc->user_resources.connections = max_user_connections;
|
||||
uc->intime= thd->thr_create_time;
|
||||
if (my_hash_insert(&hash_user_connections, (byte*) uc))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue