1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
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:
Sergei Golubchik
2013-10-18 12:34:44 -07:00
parent f1a71b6815
commit 2f2699f97b
9 changed files with 237 additions and 293 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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';

View File

@ -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

View File

@ -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

View File

@ -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