1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Revert Bug#48321 due to build breakage and failing tests.

This commit is contained in:
Davi Arnaut
2010-06-28 17:59:41 -03:00
parent 407b68bf99
commit bfd3b7a109
12 changed files with 21 additions and 602 deletions

View File

@ -194,7 +194,6 @@ static bool compare_hostname(const acl_host_and_ip *host,const char *hostname,
const char *ip);
static my_bool acl_load(THD *thd, TABLE_LIST *tables);
static my_bool grant_load(THD *thd, TABLE_LIST *tables);
static inline void get_grantor(THD *thd, char* grantor);
/*
Convert scrambled password to binary form, according to scramble type,
@ -2705,20 +2704,6 @@ end:
DBUG_RETURN(result);
}
static inline void get_grantor(THD *thd, char *grantor)
{
const char *user= thd->security_ctx->user;
const char *host= thd->security_ctx->host_or_ip;
#if defined(HAVE_REPLICATION)
if (thd->slave_thread && thd->variables.current_user.user.length > 0)
{
user= thd->variables.current_user.user.str;
host= thd->variables.current_user.host.str;
}
#endif
strxmov(grantor, user, "@", host, NullS);
}
static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
TABLE *table, const LEX_USER &combo,
@ -2733,7 +2718,9 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
uchar user_key[MAX_KEY_LENGTH];
DBUG_ENTER("replace_table_table");
get_grantor(thd, grantor);
strxmov(grantor, thd->security_ctx->user, "@",
thd->security_ctx->host_or_ip, NullS);
/*
The following should always succeed as new users are created before
this function is called!
@ -2863,7 +2850,9 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name,
DBUG_RETURN(-1);
}
get_grantor(thd, grantor);
strxmov(grantor, thd->security_ctx->user, "@",
thd->security_ctx->host_or_ip, NullS);
/*
New users are created before this function is called.