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

Merge remote-tracking branch '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin
2023-03-31 21:32:41 +02:00
306 changed files with 10920 additions and 6615 deletions

View File

@ -2565,6 +2565,8 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
"possible to remove this privilege using REVOKE.",
host.host.hostname, host.db);
}
else if (!host.db)
host.db= const_cast<char*>(host_not_specified.str);
host.access= host_table.get_access();
host.access= fix_rights_for_db(host.access);
host.sort= get_magic_sort("hd", host.host.hostname, host.db);
@ -2573,8 +2575,7 @@ static bool acl_load(THD *thd, const Grant_tables& tables)
{
sql_print_warning("'host' entry '%s|%s' "
"ignored in --skip-name-resolve mode.",
safe_str(host.host.hostname),
safe_str(host.db));
host.host.hostname, host.db);
continue;
}
#ifndef TO_BE_REMOVED
@ -3666,7 +3667,7 @@ privilege_t acl_get(const char *host, const char *ip,
ACL_HOST *acl_host=dynamic_element(&acl_hosts,i,ACL_HOST*);
if (compare_hostname(&acl_host->host,host,ip))
{
if (!acl_host->db || !wild_compare(db,acl_host->db,db_is_pattern))
if (!wild_compare(db, acl_host->db, db_is_pattern))
{
host_access=acl_host->access; // Fully specified. Take it
break;
@ -6691,6 +6692,7 @@ static int update_role_columns(GRANT_TABLE *merged,
}
}
restart:
for (uint i=0 ; i < mh->records ; i++)
{
GRANT_COLUMN *col = (GRANT_COLUMN *)my_hash_element(mh, i);
@ -6699,6 +6701,7 @@ static int update_role_columns(GRANT_TABLE *merged,
{
changed= 1;
my_hash_delete(mh, (uchar*)col);
goto restart;
}
}
DBUG_ASSERT(rights == merged->cols);