1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

replication of GRANT role statement

This commit is contained in:
Sergei Golubchik
2013-10-18 13:18:03 -07:00
parent 4d3e4c2984
commit 4ec26a7c2d
4 changed files with 47 additions and 25 deletions

View File

@@ -3908,14 +3908,8 @@ end_with_restore_list:
{
/* TODO access check */
if (thd->security_ctx->user) // If not replication
{
if (!(res= mysql_grant_role(thd, lex->users_list,
lex->sql_command == SQLCOM_GRANT_ROLE ? 0 : 1
)))
my_ok(thd);
}
else
if (!(res= mysql_grant_role(thd, lex->users_list,
lex->sql_command != SQLCOM_GRANT_ROLE)))
my_ok(thd);
break;
}