MCPcopy Create free account
hub / github.com/MariaDB/server / rebuild_check_host

Function rebuild_check_host

sql/sql_acl.cc:4008–4013  ·  view source on GitHub ↗

Rebuild lists used for checking of allowed hosts We need to rebuild 'acl_check_hosts' and 'acl_wild_hosts' after adding, dropping or renaming user, since they contain pointers to elements of 'acl_user' array, which are invalidated by drop operation, and use ACL_USER::host::hostname as a key, which is changed by rename. */

Source from the content-addressed store, hash-verified

4006 ACL_USER::host::hostname as a key, which is changed by rename.
4007*/
4008static void rebuild_check_host(void)
4009{
4010 delete_dynamic(&acl_wild_hosts);
4011 my_hash_free(&acl_check_hosts);
4012 init_check_host();
4013}
4014
4015/*
4016 Reset a role role_grants dynamic array.

Callers 4

replace_user_tableFunction · 0.85
mysql_create_userFunction · 0.85
mysql_drop_userFunction · 0.85
mysql_rename_userFunction · 0.85

Calls 3

delete_dynamicFunction · 0.85
my_hash_freeFunction · 0.85
init_check_hostFunction · 0.85

Tested by

no test coverage detected