summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-08-03 13:04:43 +0200
committerSergei Golubchik <serg@mariadb.org>2018-09-04 08:31:46 +0200
commitff34436a2ecc30a177cb304fd1dce928d8709f45 (patch)
tree274e6b8513dee3f14e0db3a836e0ff37c823f5c2
parent14ddcb1ff27dbb7248c63a01756852404b6d5209 (diff)
downloadmariadb-git-ff34436a2ecc30a177cb304fd1dce928d8709f45.tar.gz
Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS
test case
-rw-r--r--mysql-test/r/grant.result21
-rw-r--r--mysql-test/t/grant.test21
2 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 85e42ea96ee..60f2eb90e2d 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -2581,3 +2581,24 @@ foo@localhost foo@127.0.0.1
# Clean-up
DROP USER foo@'127.0.0.1';
# End of Bug#12766319
+create user foo@localhost;
+create database foodb;
+grant create routine on foodb.* to foo@localhost;
+create procedure fooproc() select 'i am fooproc';
+show grants;
+Grants for foo@localhost
+GRANT USAGE ON *.* TO 'foo'@'localhost'
+GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
+GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost'
+rename table mysql.procs_priv to mysql.procs_priv1;
+flush privileges;
+ERROR 42S02: Table 'mysql.procs_priv' doesn't exist
+show grants for foo@localhost;
+Grants for foo@localhost
+GRANT USAGE ON *.* TO 'foo'@'localhost'
+GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost'
+GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost'
+rename table mysql.procs_priv1 to mysql.procs_priv;
+drop user foo@localhost;
+drop procedure fooproc;
+drop database foodb;
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index 5de3328944a..220cc0a248c 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -2244,5 +2244,26 @@ DROP USER foo@'127.0.0.1';
--echo # End of Bug#12766319
+#
+# Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS
+#
+create user foo@localhost;
+create database foodb;
+grant create routine on foodb.* to foo@localhost;
+connect con1,localhost,foo;
+create procedure fooproc() select 'i am fooproc';
+show grants;
+disconnect con1;
+connection default;
+rename table mysql.procs_priv to mysql.procs_priv1;
+error ER_NO_SUCH_TABLE;
+flush privileges;
+show grants for foo@localhost;
+rename table mysql.procs_priv1 to mysql.procs_priv;
+drop user foo@localhost;
+drop procedure fooproc;
+drop database foodb;
+
+
# Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc