Commit 2f2699f9 authored by Sergei Golubchik's avatar Sergei Golubchik

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.
parent f1a71b68
......@@ -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
......
This diff is collapsed.
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