summaryrefslogtreecommitdiff
path: root/mysql-test/t/grant.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r--mysql-test/t/grant.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index 8d909d63f51..2a1940f4326 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -1277,3 +1277,23 @@ drop user юзер_юзер@localhost;
--error ER_WRONG_STRING_LENGTH
grant select on test.* to очень_длинный_юзер@localhost;
set names default;
+
+
+#
+# Bug #16470 crash on grant if old grant tables
+#
+--echo FLUSH PRIVILEGES without procs_priv table.
+RENAME TABLE mysql.procs_priv TO mysql.procs_gone;
+FLUSH PRIVILEGES;
+--echo Assigning privileges without procs_priv table.
+CREATE DATABASE mysqltest1;
+CREATE PROCEDURE mysqltest1.test() SQL SECURITY DEFINER
+ SELECT 1;
+--error ER_NO_SUCH_TABLE
+GRANT EXECUTE ON FUNCTION mysqltest1.test TO mysqltest_1@localhost;
+GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
+CALL mysqltest1.test();
+DROP DATABASE mysqltest1;
+RENAME TABLE mysql.procs_gone TO mysql.procs_priv;
+FLUSH PRIVILEGES;
+