@@ -697,9 +697,9 @@ static bool add_role_user_mapping(const char *uname, const char *hname, const ch
697
697
static bool get_YN_as_bool (Field *field);
698
698
699
699
#define ROLE_CYCLE_FOUND 2
700
- static int traverse_role_graph_up (ACL_ROLE *, void *,
701
- int (*) (ACL_ROLE *, void *),
702
- int (*) (ACL_ROLE *, ACL_ROLE *, void *));
700
+ static int
701
+ traverse_role_graph_up (ACL_ROLE *, void *, int (*)(ACL_USER_BASE *, void *),
702
+ int (*)(ACL_USER_BASE *, ACL_ROLE *, void *));
703
703
704
704
static int traverse_role_graph_down (ACL_USER_BASE *, void *,
705
705
int (*) (ACL_USER_BASE *, void *),
@@ -2848,7 +2848,7 @@ void acl_free(bool end)
2848
2848
my_hash_free (&acl_roles);
2849
2849
free_root (&acl_memroot,MYF (0 ));
2850
2850
delete_dynamic (&acl_hosts);
2851
- delete_dynamic_with_callback (&acl_users, (FREE_FUNC) free_acl_user);
2851
+ delete_dynamic_with_callback (&acl_users, free_acl_user);
2852
2852
acl_dbs.free_memory ();
2853
2853
delete_dynamic (&acl_wild_hosts);
2854
2854
delete_dynamic (&acl_proxy_users);
@@ -2956,7 +2956,7 @@ bool acl_reload(THD *thd)
2956
2956
my_hash_free (&old_acl_roles);
2957
2957
free_root (&old_mem,MYF (0 ));
2958
2958
delete_dynamic (&old_acl_hosts);
2959
- delete_dynamic_with_callback (&old_acl_users, (FREE_FUNC) free_acl_user);
2959
+ delete_dynamic_with_callback (&old_acl_users, free_acl_user);
2960
2960
delete_dynamic (&old_acl_proxy_users);
2961
2961
my_hash_free (&old_acl_roles_mappings);
2962
2962
}
@@ -6222,19 +6222,20 @@ static enum PRIVS_TO_MERGE::what sp_privs_to_merge(enum_sp_type type)
6222
6222
}
6223
6223
6224
6224
6225
- static int init_role_for_merging (ACL_ROLE *role , void *context)
6225
+ static int init_role_for_merging (ACL_USER_BASE *role_ , void *context)
6226
6226
{
6227
+ ACL_ROLE *role= static_cast <ACL_ROLE *>(role_);
6227
6228
role->counter = 0 ;
6228
6229
return 0 ;
6229
6230
}
6230
6231
6231
- static int count_subgraph_nodes (ACL_ROLE *role , ACL_ROLE *grantee, void *context)
6232
+ static int count_subgraph_nodes (ACL_USER_BASE * , ACL_ROLE *grantee, void *context)
6232
6233
{
6233
6234
grantee->counter ++;
6234
6235
return 0 ;
6235
6236
}
6236
6237
6237
- static int merge_role_privileges (ACL_ROLE *, ACL_ROLE *, void *);
6238
+ static int merge_role_privileges (ACL_USER_BASE *, ACL_ROLE *, void *);
6238
6239
static bool merge_one_role_privileges (ACL_ROLE *grantee, PRIVS_TO_MERGE what);
6239
6240
6240
6241
/* *
@@ -6474,13 +6475,11 @@ static int traverse_role_graph_impl(ACL_USER_BASE *user, void *context,
6474
6475
*/
6475
6476
6476
6477
static int traverse_role_graph_up (ACL_ROLE *role, void *context,
6477
- int (*on_node) (ACL_ROLE *role, void *context),
6478
- int (*on_edge) (ACL_ROLE *current, ACL_ROLE *neighbour, void *context))
6478
+ int (*on_node) (ACL_USER_BASE *role, void *context),
6479
+ int (*on_edge) (ACL_USER_BASE *current, ACL_ROLE *neighbour, void *context))
6479
6480
{
6480
- return traverse_role_graph_impl (role, context,
6481
- my_offsetof (ACL_ROLE, parent_grantee),
6482
- (int (*)(ACL_USER_BASE *, void *))on_node,
6483
- (int (*)(ACL_USER_BASE *, ACL_ROLE *, void *))on_edge);
6481
+ return traverse_role_graph_impl (
6482
+ role, context, my_offsetof (ACL_ROLE, parent_grantee), on_node, on_edge);
6484
6483
}
6485
6484
6486
6485
/* *
@@ -7020,7 +7019,7 @@ static bool merge_role_routine_grant_privileges(ACL_ROLE *grantee,
7020
7019
/* *
7021
7020
update privileges of the 'grantee' from all roles, granted to it
7022
7021
*/
7023
- static int merge_role_privileges (ACL_ROLE *role __attribute__ ((unused)) ,
7022
+ static int merge_role_privileges (ACL_USER_BASE * ,
7024
7023
ACL_ROLE *grantee, void *context)
7025
7024
{
7026
7025
PRIVS_TO_MERGE *data= (PRIVS_TO_MERGE *)context;
0 commit comments