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

REVOKE all privileges and delete user(244)

This commit is contained in:
gluh@gluh.mysql.r18.ru
2003-06-06 17:43:23 +05:00
parent 7342852dd9
commit 7d020eae17
32 changed files with 456 additions and 21 deletions

View File

@@ -2897,6 +2897,38 @@ mysql_execute_command(THD *thd)
res= -1;
#endif
break;
case SQLCOM_DROP_USER:
{
if (check_access(thd, GRANT_ACL,"mysql",0,1))
break;
if (!(res= mysql_drop_user(thd, lex->users_list)))
{
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
mysql_bin_log.write(&qinfo);
}
send_ok(thd);
}
break;
}
case SQLCOM_REVOKE_ALL:
{
if (check_access(thd, GRANT_ACL ,"mysql",0,1))
break;
if (!(res = mysql_revoke_all(thd, lex->users_list)))
{
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
mysql_bin_log.write(&qinfo);
}
send_ok(thd);
}
break;
}
case SQLCOM_REVOKE:
case SQLCOM_GRANT:
{