diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c930eb0824a..0fdc0b1690c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1138,12 +1138,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd, /* Ensure we don't free security_ctx->user in case we have to revert */ thd->security_ctx->user= 0; + thd->user_connect= 0; if (acl_authenticate(thd, 0, packet_length)) { /* Free user if allocated by acl_authenticate */ x_free(thd->security_ctx->user); *thd->security_ctx= save_security_ctx; + if (thd->user_connect) + decrease_user_connections(thd->user_connect); thd->user_connect= save_user_connect; thd->reset_db(save_db, save_db_length); thd->variables.character_set_client= save_character_set_client; |