From 22b171d3044675481c03b83888cffa018a502c4e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 9 Jan 2021 17:56:33 +0100 Subject: MDEV-17852 Altered connection limits for user have no effect update mqh in struct user_conn after taking it from the cache --- sql/sql_connect.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_connect.cc') diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index aa7a877ed20..ec1bc45433a 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -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: -- cgit v1.2.1