Commit 1c6394e5 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4931 Can't use SHUTDOWN in stored programs

keywords that a statement could start from can only be
in the 'keyword' list, never in the 'keyword_sp'
parent 5e2b5510
create user user1@localhost; create user user1@localhost;
shutdown; shutdown;
ERROR 42000: Access denied; you need (at least one of) the SHUTDOWN privilege(s) for this operation ERROR 42000: Access denied; you need (at least one of) the SHUTDOWN privilege(s) for this operation
create procedure try_shutdown() shutdown;
drop procedure try_shutdown;
shutdown; shutdown;
drop user user1@localhost; drop user user1@localhost;
...@@ -13,6 +13,9 @@ connection default; ...@@ -13,6 +13,9 @@ connection default;
disconnect c1; disconnect c1;
--connect (c1,localhost,root,,) --connect (c1,localhost,root,,)
create procedure try_shutdown() shutdown;
drop procedure try_shutdown;
--let $_server_id= `SELECT @@server_id` --let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name --exec echo "wait" > $_expect_file_name
......
...@@ -955,10 +955,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); ...@@ -955,10 +955,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%parse-param { THD *thd } %parse-param { THD *thd }
%lex-param { THD *thd } %lex-param { THD *thd }
/* /*
Currently there are 186 shift/reduce conflicts. Currently there are 164 shift/reduce conflicts.
We should not introduce new conflicts any more. We should not introduce new conflicts any more.
*/ */
%expect 186 %expect 164
/* /*
Comments for TOKENS. Comments for TOKENS.
...@@ -14005,6 +14005,7 @@ keyword: ...@@ -14005,6 +14005,7 @@ keyword:
| SAVEPOINT_SYM {} | SAVEPOINT_SYM {}
| SECURITY_SYM {} | SECURITY_SYM {}
| SERVER_SYM {} | SERVER_SYM {}
| SHUTDOWN {}
| SIGNED_SYM {} | SIGNED_SYM {}
| SOCKET_SYM {} | SOCKET_SYM {}
| SLAVE {} | SLAVE {}
...@@ -14275,7 +14276,6 @@ keyword_sp: ...@@ -14275,7 +14276,6 @@ keyword_sp:
| SESSION_SYM {} | SESSION_SYM {}
| SIMPLE_SYM {} | SIMPLE_SYM {}
| SHARE_SYM {} | SHARE_SYM {}
| SHUTDOWN {}
| SLAVE_POS_SYM {} | SLAVE_POS_SYM {}
| SLOW {} | SLOW {}
| SNAPSHOT_SYM {} | SNAPSHOT_SYM {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment