summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2003-06-06 17:44:33 +0500
committerunknown <gluh@gluh.mysql.r18.ru>2003-06-06 17:44:33 +0500
commit7fac151beaf476189878204bbee60f762174a760 (patch)
tree935fe9e67d99ed4d697a9516096790cb8dfce487 /sql/sql_parse.cc
parentac366a4ba59a4422aed2b1a0d3963794b997f668 (diff)
parentd1a1d24c1f95bd50a8105f120a284ff4bf4ccdd6 (diff)
downloadmariadb-git-7fac151beaf476189878204bbee60f762174a760.tar.gz
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.revoke sql/sql_parse.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a092df8193b..a9a29904b60 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -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:
{