Skip to content

Commit ff34436

Browse files
committed
Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS
test case
1 parent 14ddcb1 commit ff34436

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

mysql-test/r/grant.result

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,3 +2581,24 @@ foo@localhost foo@127.0.0.1
25812581
# Clean-up
25822582
DROP USER foo@'127.0.0.1';
25832583
# End of Bug#12766319
2584+
create user foo@localhost;
2585+
create database foodb;
2586+
grant create routine on foodb.* to foo@localhost;
2587+
create procedure fooproc() select 'i am fooproc';
2588+
show grants;
2589+
Grants for foo@localhost
2590+
GRANT USAGE ON *.* TO 'foo'@'localhost'
2591+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
2592+
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost'
2593+
rename table mysql.procs_priv to mysql.procs_priv1;
2594+
flush privileges;
2595+
ERROR 42S02: Table 'mysql.procs_priv' doesn't exist
2596+
show grants for foo@localhost;
2597+
Grants for foo@localhost
2598+
GRANT USAGE ON *.* TO 'foo'@'localhost'
2599+
GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
2600+
GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost'
2601+
rename table mysql.procs_priv1 to mysql.procs_priv;
2602+
drop user foo@localhost;
2603+
drop procedure fooproc;
2604+
drop database foodb;

mysql-test/t/grant.test

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,5 +2244,26 @@ DROP USER foo@'127.0.0.1';
22442244

22452245
--echo # End of Bug#12766319
22462246

2247+
#
2248+
# Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS
2249+
#
2250+
create user foo@localhost;
2251+
create database foodb;
2252+
grant create routine on foodb.* to foo@localhost;
2253+
connect con1,localhost,foo;
2254+
create procedure fooproc() select 'i am fooproc';
2255+
show grants;
2256+
disconnect con1;
2257+
connection default;
2258+
rename table mysql.procs_priv to mysql.procs_priv1;
2259+
error ER_NO_SUCH_TABLE;
2260+
flush privileges;
2261+
show grants for foo@localhost;
2262+
rename table mysql.procs_priv1 to mysql.procs_priv;
2263+
drop user foo@localhost;
2264+
drop procedure fooproc;
2265+
drop database foodb;
2266+
2267+
22472268
# Wait till we reached the initial number of concurrent sessions
22482269
--source include/wait_until_count_sessions.inc

0 commit comments

Comments
 (0)