mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.0' into 10.1
This commit is contained in:
@ -7382,8 +7382,7 @@ bool check_grant_db(THD *thd, const char *db)
|
||||
len= (uint) (end - helping) + 1;
|
||||
|
||||
/*
|
||||
If a role is set, we need to check for privileges
|
||||
here aswell
|
||||
If a role is set, we need to check for privileges here as well.
|
||||
*/
|
||||
if (sctx->priv_role[0])
|
||||
{
|
||||
@ -7397,11 +7396,10 @@ bool check_grant_db(THD *thd, const char *db)
|
||||
|
||||
for (uint idx=0 ; idx < column_priv_hash.records ; idx++)
|
||||
{
|
||||
GRANT_TABLE *grant_table= (GRANT_TABLE*)
|
||||
my_hash_element(&column_priv_hash,
|
||||
idx);
|
||||
GRANT_TABLE *grant_table= (GRANT_TABLE*) my_hash_element(&column_priv_hash,
|
||||
idx);
|
||||
if (len < grant_table->key_length &&
|
||||
!memcmp(grant_table->hash_key,helping,len) &&
|
||||
!memcmp(grant_table->hash_key, helping, len) &&
|
||||
compare_hostname(&grant_table->host, sctx->host, sctx->ip))
|
||||
{
|
||||
error= FALSE; /* Found match. */
|
||||
@ -7409,7 +7407,7 @@ bool check_grant_db(THD *thd, const char *db)
|
||||
}
|
||||
if (sctx->priv_role[0] &&
|
||||
len2 < grant_table->key_length &&
|
||||
!memcmp(grant_table->hash_key,helping2,len) &&
|
||||
!memcmp(grant_table->hash_key, helping2, len2) &&
|
||||
(!grant_table->host.hostname || !grant_table->host.hostname[0]))
|
||||
{
|
||||
error= FALSE; /* Found role match */
|
||||
|
Reference in New Issue
Block a user