1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.5' into 10.6

This commit is contained in:
Oleksandr Byelkin
2023-11-08 15:57:05 +01:00
381 changed files with 10233 additions and 5782 deletions

View File

@ -5351,6 +5351,13 @@ public:
};
privilege_t GRANT_INFO::all_privilege()
{
return (grant_table_user ? grant_table_user->cols : NO_ACL) |
(grant_table_role ? grant_table_role->cols : NO_ACL) | privilege;
}
void GRANT_NAME::set_user_details(const char *h, const char *d,
const char *u, const char *t,
bool is_routine)
@ -8368,9 +8375,7 @@ bool check_grant(THD *thd, privilege_t want_access, TABLE_LIST *tables,
if (!(~t_ref->grant.privilege & want_access))
continue;
if ((want_access&= ~((grant_table ? grant_table->cols : NO_ACL) |
(grant_table_role ? grant_table_role->cols : NO_ACL) |
t_ref->grant.privilege)))
if ((want_access&= ~t_ref->grant.all_privilege()))
{
goto err; // impossible
}