mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
cleanup.
mainly to avoid the pattern of * get username/hostname/rolename * optionally find the corresponding ACL_USER and ACL_ROLE * allocate memory, concatenate username/hostname/rolename * call a function passing only this memory as an argument ** use concatenated username/etc to find ACL_USER and ACL_ROLE again ** do something * free the object Also to undo push_dynamic we use pop_dynamic now, not a linear search/scan through the dynamic array. as a bonus, role@ is now an invalid way to refer to a role.
This commit is contained in:
@ -2,7 +2,7 @@ create user test_user@localhost;
|
||||
create role test_role1;
|
||||
grant test_role1 to test_user@localhost;
|
||||
create role test_role2;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
user host
|
||||
test_role1
|
||||
|
@ -2,7 +2,7 @@ create user test_user@localhost;
|
||||
create role test_role1;
|
||||
create role test_role2;
|
||||
grant test_role1 to test_user@localhost;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
user host
|
||||
test_role1
|
||||
|
@ -2,7 +2,7 @@ create user test_user@localhost;
|
||||
create role test_role1;
|
||||
create role test_role2;
|
||||
grant test_role1 to test_user@localhost;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
user host
|
||||
test_role1
|
||||
|
@ -3,7 +3,7 @@ create role test_role1;
|
||||
create role test_role2;
|
||||
grant test_role1 to test_user@localhost;
|
||||
grant test_role2 to test_user@localhost;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
user host
|
||||
test_role1
|
||||
|
@ -4,7 +4,7 @@ create user test_user@localhost;
|
||||
create role test_role1;
|
||||
grant test_role1 to test_user@localhost;
|
||||
create role test_role2;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
|
||||
--sorted_result
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
|
@ -3,7 +3,7 @@ create role test_role1;
|
||||
create role test_role2;
|
||||
|
||||
grant test_role1 to test_user@localhost;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
--sorted_result
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
--sorted_result
|
||||
|
@ -3,7 +3,7 @@ create role test_role1;
|
||||
create role test_role2;
|
||||
|
||||
grant test_role1 to test_user@localhost;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
--sorted_result
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
--sorted_result
|
||||
|
@ -5,7 +5,7 @@ create role test_role2;
|
||||
|
||||
grant test_role1 to test_user@localhost;
|
||||
grant test_role2 to test_user@localhost;
|
||||
grant test_role2 to test_role1@;
|
||||
grant test_role2 to test_role1;
|
||||
--sorted_result
|
||||
select user, host from mysql.user where user not like 'root';
|
||||
--sorted_result
|
||||
|
Reference in New Issue
Block a user