summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2022-06-06 20:37:03 +0300
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2022-06-12 17:24:12 +0300
commit0d5568fdb9c203ea76f1f52472dfd165d38f46a7 (patch)
tree108eab14018536f06639738c33717ad6223d944c
parentc625aeb9a75c1ced033143341ebb8a969c0959c1 (diff)
downloadmariadb-git-0d5568fdb9c203ea76f1f52472dfd165d38f46a7.tar.gz
cleanup: get_cached_{schema|table}_access is not part of sql_acl.h interface
The functions are only used internally in the sql_acl.cc module. Mark them as static. TODO: The GRANT_INFO structure inside table could be encapsulated so we do not have code that access it like table_list->grant.m_internal.<member>
-rw-r--r--sql/sql_acl.cc12
-rw-r--r--sql/sql_acl.h8
2 files changed, 10 insertions, 10 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 189c727be3c..33ea2ccf694 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -659,6 +659,14 @@ static bool show_table_and_column_privileges(THD *, const char *, const char *,
static int show_routine_grants(THD *, const char *, const char *,
const Sp_handler *sph, char *, int);
+static const ACL_internal_schema_access *
+get_cached_schema_access(GRANT_INTERNAL_INFO *grant_internal_info,
+ const char *schema_name);
+static const ACL_internal_table_access *
+get_cached_table_access(GRANT_INTERNAL_INFO *grant_internal_info,
+ const char *schema_name,
+ const char *table_name);
+
class Grant_tables;
class User_table;
class Proxies_priv_table;
@@ -14587,7 +14595,7 @@ ACL_internal_schema_registry::lookup(const char *name)
@param grant_internal_info the cache
@param schema_name the name of the internal schema
*/
-const ACL_internal_schema_access *
+static const ACL_internal_schema_access *
get_cached_schema_access(GRANT_INTERNAL_INFO *grant_internal_info,
const char *schema_name)
{
@@ -14610,7 +14618,7 @@ get_cached_schema_access(GRANT_INTERNAL_INFO *grant_internal_info,
@param schema_name the name of the internal schema
@param table_name the name of the internal table
*/
-const ACL_internal_table_access *
+static const ACL_internal_table_access *
get_cached_table_access(GRANT_INTERNAL_INFO *grant_internal_info,
const char *schema_name,
const char *table_name)
diff --git a/sql/sql_acl.h b/sql/sql_acl.h
index a75034abd96..f8eb49dbda4 100644
--- a/sql/sql_acl.h
+++ b/sql/sql_acl.h
@@ -309,14 +309,6 @@ public:
static const ACL_internal_schema_access *lookup(const char *name);
};
-const ACL_internal_schema_access *
-get_cached_schema_access(GRANT_INTERNAL_INFO *grant_internal_info,
- const char *schema_name);
-
-const ACL_internal_table_access *
-get_cached_table_access(GRANT_INTERNAL_INFO *grant_internal_info,
- const char *schema_name,
- const char *table_name);
int acl_setrole(THD *thd, const char *rolename, privilege_t access);
int acl_check_setrole(THD *thd, const char *rolename, privilege_t *access);