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;
shutdown;
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;
drop user user1@localhost;
......@@ -13,6 +13,9 @@ connection default;
disconnect c1;
--connect (c1,localhost,root,,)
create procedure try_shutdown() shutdown;
drop procedure try_shutdown;
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
......
......@@ -955,10 +955,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%parse-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.
*/
%expect 186
%expect 164
/*
Comments for TOKENS.
......@@ -14005,6 +14005,7 @@ keyword:
| SAVEPOINT_SYM {}
| SECURITY_SYM {}
| SERVER_SYM {}
| SHUTDOWN {}
| SIGNED_SYM {}
| SOCKET_SYM {}
| SLAVE {}
......@@ -14275,7 +14276,6 @@ keyword_sp:
| SESSION_SYM {}
| SIMPLE_SYM {}
| SHARE_SYM {}
| SHUTDOWN {}
| SLAVE_POS_SYM {}
| SLOW {}
| 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