Commit 4635218c authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-22521 Server crashes in traverse_role_graph_up or Assertion `user' fails...

MDEV-22521 Server crashes in traverse_role_graph_up or Assertion `user' fails in traverse_role_graph_impl
parent 4860fe24
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 ''
--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;
...@@ -4977,6 +4977,8 @@ static void propagate_role_grants(ACL_ROLE *role, ...@@ -4977,6 +4977,8 @@ static void propagate_role_grants(ACL_ROLE *role,
enum PRIVS_TO_MERGE::what what, enum PRIVS_TO_MERGE::what what,
const char *db= 0, const char *name= 0) const char *db= 0, const char *name= 0)
{ {
if (!role)
return;
mysql_mutex_assert_owner(&acl_cache->lock); mysql_mutex_assert_owner(&acl_cache->lock);
PRIVS_TO_MERGE data= { what, db, name }; PRIVS_TO_MERGE data= { what, db, name };
......
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