diff options
author | unknown <gluh@gluh.mysql.r18.ru> | 2003-06-06 17:44:33 +0500 |
---|---|---|
committer | unknown <gluh@gluh.mysql.r18.ru> | 2003-06-06 17:44:33 +0500 |
commit | 7fac151beaf476189878204bbee60f762174a760 (patch) | |
tree | 935fe9e67d99ed4d697a9516096790cb8dfce487 /sql/sql_yacc.yy | |
parent | ac366a4ba59a4422aed2b1a0d3963794b997f668 (diff) | |
parent | d1a1d24c1f95bd50a8105f120a284ff4bf4ccdd6 (diff) | |
download | mariadb-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_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 97a7cc6bcda..91bd5a77d27 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3216,7 +3216,7 @@ do: DO_SYM ; /* - Drop : delete tables or index + Drop : delete tables or index or user */ drop: @@ -3250,7 +3250,16 @@ drop: LEX *lex=Lex; lex->sql_command = SQLCOM_DROP_FUNCTION; lex->udf.name = $3; - }; + } + | DROP USER + { + LEX *lex=Lex; + lex->sql_command = SQLCOM_DROP_USER; + lex->users_list.empty(); + } + user_list + {} + ; table_list: @@ -4178,8 +4187,10 @@ user: THD *thd= YYTHD; if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) YYABORT; - $$->user = $1; $$->host.str=NullS; - } + $$->user = $1; + $$->host.str= (char *) "%"; + $$->host.length= 1; + } | ident_or_text '@' ident_or_text { THD *thd= YYTHD; @@ -4363,6 +4374,7 @@ keyword: | UDF_SYM {} | UNCOMMITTED_SYM {} | UNICODE_SYM {} + | USER {} | USE_FRM {} | VARIABLES {} | VALUE_SYM {} @@ -4634,8 +4646,18 @@ revoke: lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0; bzero((char*) &lex->mqh, sizeof(lex->mqh)); } + revoke_command + {} + ; + +revoke_command: grant_privileges ON opt_table FROM user_list {} + | + ALL PRIVILEGES ',' GRANT FROM user_list + { + Lex->sql_command = SQLCOM_REVOKE_ALL; + } ; grant: |