1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Code cleanups during review of pushed code

sql/mysql_priv.h:
  Added 'const' to some arguments
sql/sp_head.cc:
  Added comments
  code cleanup
  acceess -> access
sql/sql_acl.cc:
  Simply code by making check_routine_level_acl() available also in embedded server
sql/sql_acl.h:
  Added 'const' to some arguments
sql/sql_parse.cc:
  Added 'const' to some arguments
  Fixed the check_rounte_level_acl() is always called
  (old code didn't properly check access privilges if grant_option was not set)
sql/sql_show.cc:
  Simplify usage of get_field()
  Now we can always call check_some_routine_access()
sql/sql_udf.cc:
  Don't give warnings for suspicios UDF's if --log-warnings isn't given
sql/table.cc:
  Simplify usage of get_field()
This commit is contained in:
unknown
2005-03-15 16:07:28 +02:00
parent 722ffa879f
commit ef7ebed413
8 changed files with 55 additions and 48 deletions

View File

@@ -4760,7 +4760,7 @@ check_procedure_access(THD *thd, ulong want_access,char *db, char *name,
1 error
*/
bool check_some_routine_access(THD *thd, char *db, char *name)
bool check_some_routine_access(THD *thd, const char *db, const char *name)
{
ulong save_priv;
if (thd->master_access & SHOW_PROC_ACLS)
@@ -4768,12 +4768,7 @@ bool check_some_routine_access(THD *thd, char *db, char *name)
if (!check_access(thd, SHOW_PROC_ACLS, db, &save_priv, 0, 1) ||
(save_priv & SHOW_PROC_ACLS))
return FALSE;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (grant_option)
return check_routine_level_acl(thd, db, name);
#endif
return FALSE;
return check_routine_level_acl(thd, db, name);
}