diff options
author | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2013-10-18 09:25:42 -0700 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-10-18 09:25:42 -0700 |
commit | 60f19cbc9aa425ab5606383f81829d54643f4fd8 (patch) | |
tree | 6e282a31f81d4ec33e68fb8bb9a198068ade4f31 /sql/sql_parse.cc | |
parent | df48f63684e3439eae7f4fdf77c995ed7112d792 (diff) | |
download | mariadb-git-60f19cbc9aa425ab5606383f81829d54643f4fd8.tar.gz |
Added GRANT ROLE TO ... and REVOKE ROLE FROM ... functionality.
TODO:
Privilege checks are not done upon executing the command.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 24b4fd0fc27..7aecdff761a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3894,7 +3894,9 @@ end_with_restore_list: if (thd->security_ctx->user) // If not replication { - if (!(res= mysql_grant_role(thd, lex->users_list))) + if (!(res= mysql_grant_role(thd, lex->users_list, + lex->sql_command == SQLCOM_GRANT_ROLE ? 0 : 1 + ))) my_ok(thd); } else |