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

Added CREATE ROLE support as well as DROP ROLE support.

This commit is contained in:
Vicențiu Ciorbaru
2013-10-18 05:41:13 -07:00
committed by Sergei Golubchik
parent 81b2856e10
commit db850c525f
7 changed files with 312 additions and 44 deletions

View File

@ -3759,14 +3759,22 @@ end_with_restore_list:
}
case SQLCOM_CREATE_ROLE:
{
/* TODO */
my_ok(thd);
if (check_access(thd, INSERT_ACL, "mysql", NULL, NULL, 1, 1) &&
check_global_access(thd,CREATE_USER_ACL))
break;
/* Conditionally writes to binlog */
if (!(res= mysql_create_role(thd, lex->users_list)))
my_ok(thd);
break;
}
case SQLCOM_DROP_ROLE:
{
/* TODO */
my_ok(thd);
if (check_access(thd, DELETE_ACL, "mysql", NULL, NULL, 1, 1) &&
check_global_access(thd,CREATE_USER_ACL))
break;
/* Conditionally writes to binlog */
if (!(res= mysql_drop_role(thd, lex->users_list)))
my_ok(thd);
break;
}
case SQLCOM_REVOKE_ALL: