From 83e75b39b3611d60ac59e851f742a13f2ee95393 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sun, 9 Feb 2020 21:53:11 +0400 Subject: MDEV-21702 Add a data type for privileges --- sql/sql_parse.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sql/sql_parse.h') 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) -- cgit v1.2.1