summaryrefslogtreecommitdiff
path: root/sql/sql_parse.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-02-09 21:53:11 +0400
committerAlexander Barkov <bar@mariadb.com>2020-02-11 08:10:26 +0400
commit83e75b39b3611d60ac59e851f742a13f2ee95393 (patch)
treea1ab536573067a6578631d3e5e89da612f745ec8 /sql/sql_parse.h
parentf79f537f9facb5a050697ad3dbf6e4a617c3c128 (diff)
downloadmariadb-git-83e75b39b3611d60ac59e851f742a13f2ee95393.tar.gz
MDEV-21702 Add a data type for privileges
Diffstat (limited to 'sql/sql_parse.h')
-rw-r--r--sql/sql_parse.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/sql_parse.h b/sql/sql_parse.h
index a90628781cc..6b0ee75b57b 100644
--- a/sql/sql_parse.h
+++ b/sql/sql_parse.h
@@ -143,32 +143,32 @@ inline bool check_identifier_name(LEX_CSTRING *str)
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
-bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables);
-bool check_single_table_access(THD *thd, ulong privilege,
- TABLE_LIST *tables, bool no_errors);
-bool check_routine_access(THD *thd,ulong want_access,
+bool check_one_table_access(THD *thd, privilege_t privilege, TABLE_LIST *tables);
+bool check_single_table_access(THD *thd, privilege_t privilege,
+ TABLE_LIST *tables, bool no_errors);
+bool check_routine_access(THD *thd, privilege_t want_access,
const LEX_CSTRING *db,
const LEX_CSTRING *name,
const Sp_handler *sph, bool no_errors);
-bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table);
+bool check_some_access(THD *thd, privilege_t want_access, TABLE_LIST *table);
bool check_some_routine_access(THD *thd, const char *db, const char *name,
const Sp_handler *sph);
-bool check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
+bool check_table_access(THD *thd, privilege_t requirements,TABLE_LIST *tables,
bool any_combination_of_privileges_will_do,
uint number,
bool no_errors);
#else
-inline bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables)
+inline bool check_one_table_access(THD *thd, privilege_t privilege, TABLE_LIST *tables)
{ return false; }
-inline bool check_single_table_access(THD *thd, ulong privilege,
- TABLE_LIST *tables, bool no_errors)
+inline bool check_single_table_access(THD *thd, privilege_t privilege,
+ TABLE_LIST *tables, bool no_errors)
{ return false; }
-inline bool check_routine_access(THD *thd,ulong want_access,
+inline bool check_routine_access(THD *thd, privilege_t want_access,
const LEX_CSTRING *db,
const LEX_CSTRING *name,
const Sp_handler *sph, bool no_errors)
{ return false; }
-inline bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table)
+inline bool check_some_access(THD *thd, privilege_t want_access, TABLE_LIST *table)
{
table->grant.privilege= want_access;
return false;
@@ -178,7 +178,7 @@ inline bool check_some_routine_access(THD *thd, const char *db,
const Sp_handler *sph)
{ return false; }
inline bool
-check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
+check_table_access(THD *thd, privilege_t requirements,TABLE_LIST *tables,
bool any_combination_of_privileges_will_do,
uint number,
bool no_errors)