mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.revoke
This commit is contained in:
@@ -2904,6 +2904,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:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user