MCPcopy Create free account
hub / github.com/Tencent/phxsql / check_routine_level_acl

Function check_routine_level_acl

phx_percona/percona/sql/sql_acl.cc:6449–6463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6447*/
6448
6449bool check_routine_level_acl(THD *thd, const char *db, const char *name,
6450 bool is_proc)
6451{
6452 bool no_routine_acl= 1;
6453 GRANT_NAME *grant_proc;
6454 Security_context *sctx= thd->security_ctx;
6455 mysql_rwlock_rdlock(&LOCK_grant);
6456 if ((grant_proc= routine_hash_search(sctx->priv_host,
6457 sctx->get_ip()->ptr(), db,
6458 sctx->priv_user,
6459 name, is_proc, 0)))
6460 no_routine_acl= !(grant_proc->privs & SHOW_PROC_ACLS);
6461 mysql_rwlock_unlock(&LOCK_grant);
6462 return no_routine_acl;
6463}
6464
6465
6466/*****************************************************************************

Callers

nothing calls this directly

Calls 1

routine_hash_searchFunction · 0.85

Tested by

no test coverage detected