summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-07-30 10:01:49 +0200
committerSergei Golubchik <serg@mariadb.org>2020-07-30 23:50:56 +0200
commit4635218cb07ee15244c7a6bbcf6eeeeb7cec7fcf (patch)
tree27bb26cc6e3d23d2b1172a3fa23926a5e141eb3e /mysql-test/suite
parent4860fe244bd1f4a6f3b803648d651e49e7b92a2c (diff)
downloadmariadb-git-4635218cb07ee15244c7a6bbcf6eeeeb7cec7fcf.tar.gz
MDEV-22521 Server crashes in traverse_role_graph_up or Assertion `user' fails in traverse_role_graph_impl
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/roles/drop_current_role.result5
-rw-r--r--mysql-test/suite/roles/drop_current_role.test9
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/roles/drop_current_role.result b/mysql-test/suite/roles/drop_current_role.result
new file mode 100644
index 00000000000..79525a0ff50
--- /dev/null
+++ b/mysql-test/suite/roles/drop_current_role.result
@@ -0,0 +1,5 @@
+create role r;
+set role r;
+drop role r;
+revoke all on *.* from current_role;
+ERROR 42000: There is no such grant defined for user 'r' on host ''
diff --git a/mysql-test/suite/roles/drop_current_role.test b/mysql-test/suite/roles/drop_current_role.test
new file mode 100644
index 00000000000..1485b830eed
--- /dev/null
+++ b/mysql-test/suite/roles/drop_current_role.test
@@ -0,0 +1,9 @@
+--source include/not_embedded.inc
+#
+# MDEV-22521 Server crashes in traverse_role_graph_up or Assertion `user' fails in traverse_role_graph_impl
+#
+create role r;
+set role r;
+drop role r;
+error ER_NONEXISTING_GRANT;
+revoke all on *.* from current_role;