1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-17852 Altered connection limits for user have no effect

update mqh in struct user_conn after taking it from the cache
This commit is contained in:
Sergei Golubchik
2021-01-09 17:56:33 +01:00
parent fc0d9a470c
commit 22b171d304
3 changed files with 54 additions and 1 deletions

View File

@ -85,7 +85,6 @@ int get_or_create_user_conn(THD *thd, const char *user,
uc->host= uc->user + user_len + 1;
uc->len= temp_len;
uc->connections= uc->questions= uc->updates= uc->conn_per_hour= 0;
uc->user_resources= *mqh;
uc->reset_utime= thd->thr_create_utime;
if (my_hash_insert(&hash_user_connections, (uchar*) uc))
{
@ -95,6 +94,7 @@ int get_or_create_user_conn(THD *thd, const char *user,
goto end;
}
}
uc->user_resources= *mqh;
thd->user_connect=uc;
uc->connections++;
end: