mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge with MariaDB 5.2
This commit is contained in:
@ -1133,7 +1133,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
uint save_db_length= thd->db_length;
|
||||
char *save_db= thd->db;
|
||||
USER_CONN *save_user_connect= thd->user_connect;
|
||||
Security_context save_security_ctx= *thd->security_ctx;
|
||||
Security_context save_security_ctx= *thd->security_ctx;
|
||||
CHARSET_INFO *save_character_set_client=
|
||||
thd->variables.character_set_client;
|
||||
CHARSET_INFO *save_collation_connection=
|
||||
@ -1141,8 +1141,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
CHARSET_INFO *save_character_set_results=
|
||||
thd->variables.character_set_results;
|
||||
|
||||
/* Ensure we don't free security_ctx->user in case we have to revert */
|
||||
thd->security_ctx->user= 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;
|
||||
thd->user_connect= save_user_connect;
|
||||
|
Reference in New Issue
Block a user