1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Implemented _non recursive_ role specific grants for table/column level privileges

This commit is contained in:
Vicențiu Ciorbaru
2013-10-18 05:11:16 -07:00
committed by Sergei Golubchik
parent 2060937353
commit fe521dc28e
4 changed files with 173 additions and 45 deletions

View File

@ -1478,6 +1478,11 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
sctx->priv_user,
new_db_file_name.str,
FALSE) | sctx->master_access;
if (sctx->priv_role)
{
/* include a possible currently set role for access */
db_access|= acl_get("", "", sctx->priv_role, new_db_file_name.str, FALSE);
}
if (!force_switch &&
!(db_access & DB_ACLS) &&